/* =================================================================================================
   Asistente de onboarding. Mobile first: una columna, acción fija y vista previa en diálogo.
   ================================================================================================= */

.ob-body {
  background: var(--surface);
  padding-bottom: 0;
}
.ob-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.ob-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.ob-header .brand {
  min-height: 44px;
}
.ob-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.save-status {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
}
.save-status[data-tone="saving"] {
  color: var(--accent);
}
.save-status[data-tone="saved"] {
  color: var(--ok);
}
.save-status[data-tone="error"] {
  color: var(--error);
}

.ob-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding-top: clamp(24px, 4vw, 44px);
  padding-bottom: clamp(80px, 10vw, 120px);
}
.ob-main {
  width: 100%;
  min-width: 0;
  max-width: 760px;
}

/* Progreso ------------------------------------------------------------------------------------ */
.ob-progress {
  margin-bottom: 28px;
}
.ob-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.ob-step-label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}
.ob-step-label strong {
  color: var(--brand);
}
.ob-time {
  color: var(--ink-soft);
  font-size: 0.76rem;
}
.ob-preview-link {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--white);
  color: var(--brand);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.ob-preview-link[hidden] {
  display: none;
}
.ob-bar {
  height: 4px;
  overflow: hidden;
  border-radius: var(--pill);
  background: var(--surface-3);
}
.ob-bar span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.ob-stepper {
  display: flex;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.ob-stepper::-webkit-scrollbar {
  display: none;
}
.ob-stepper li {
  flex: 1 0 auto;
}
.ob-stepper button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ob-stepper button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
}
.ob-stepper button[aria-current="step"] {
  color: var(--ink);
}
.ob-stepper button[aria-current="step"] span {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}
.ob-stepper button[data-done="true"] span {
  border-color: var(--brand);
  color: var(--brand);
}
.ob-stepper button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Paneles ------------------------------------------------------------------------------------- */
.ob-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.2vw, 40px);
  box-shadow: var(--shadow-sm);
}
.ob-kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ob-panel h1,
.ob-panel h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  line-height: 1.08;
}
.ob-lead {
  margin: 14px 0 28px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 60ch;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.ob-panel .field {
  margin-bottom: 20px;
}
.ob-panel .why {
  max-width: 52ch;
}
.ob-panel .hint {
  max-width: 60ch;
}
.ob-fieldset {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}
.ob-fieldset legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
}
.password-wrap {
  position: relative;
}
.password-wrap .input {
  padding-right: 84px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--brand);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.slug-field {
  margin-top: 4px;
}
.plan-chip {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}
.plan-chip strong {
  color: var(--ink);
}
.plan-chip a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand);
  font-weight: 700;
}

/* Plantillas y paletas ------------------------------------------------------------------------ */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.template-hint {
  margin-bottom: 12px;
}
.template-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.template-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.template-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.template-card:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.template-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}
.template-body {
  display: grid;
  gap: 2px;
  padding: 10px;
}
.template-body strong {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.25;
}
.template-body small {
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.35;
}
.palette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.palette-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
.palette-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.palette-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.palette-card:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.swatches {
  display: flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--pill);
}
.swatches i {
  display: block;
  width: 12px;
  height: 26px;
}
.palette-card strong {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.2;
}
.custom-color {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.custom-color summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.custom-color-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 6px 0 8px;
}
.custom-color-row label {
  font-size: 0.8rem;
  font-weight: 700;
}
.custom-color-row input[type="color"] {
  width: 52px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

/* Zonas de carga ------------------------------------------------------------------------------ */
.dropzone {
  position: relative;
  min-height: 128px;
  padding: 16px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.dropzone:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.dropzone-empty {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 94px;
  text-align: center;
}
.dropzone-empty strong {
  color: var(--ink);
  font-size: 0.88rem;
}
.dropzone-empty small {
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.4;
  max-width: 42ch;
}
.dropzone-filled img {
  width: 100%;
  max-height: 220px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.dropzone-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
}
.dropzone--logo {
  min-height: 110px;
  max-width: 300px;
}
.dropzone--logo .dropzone-empty {
  min-height: 76px;
}
.dropzone--logo .dropzone-filled img {
  width: auto;
  max-width: 100%;
  max-height: 80px;
  margin: 0 auto;
  object-fit: contain;
}
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.logo-fallback {
  display: grid;
  gap: 4px;
}
.logo-sample {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}
.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.upload-row .hint {
  flex: 1;
  min-width: 220px;
}

/* Pago ---------------------------------------------------------------------------------------- */
.transfer-preview {
  margin: 6px 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.transfer-title {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.transfer-body {
  padding: 14px;
}
.transfer-body > p:first-child {
  color: var(--ink);
  font-size: 0.9rem;
}
.transfer-body dl {
  margin: 10px 0;
}
.transfer-body dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.transfer-body dt {
  color: var(--ink-soft);
}
.transfer-body dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.terms-check {
  margin-top: 8px;
}
.terms-check a {
  color: var(--brand);
  font-weight: 700;
}

/* Acciones ------------------------------------------------------------------------------------ */
.ob-form-status {
  margin: 16px 0 0;
  font-size: 0.85rem;
}
.ob-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.ob-actions-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.ob-next-hint {
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-align: right;
  max-width: 30ch;
}
.ob-success {
  text-align: left;
}
.success-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 800;
}
.url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.url-box span {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.next-steps {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.next-steps h2 {
  font-size: 1.2rem;
}
.next-steps ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}
.next-steps li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}
.next-steps li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand);
}

/* Vista previa -------------------------------------------------------------------------------- */
.ob-aside {
  position: sticky;
  top: 88px;
  min-width: 0;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.preview-toolbar p {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.preview-devices {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface-2);
}
.preview-devices button {
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}
.preview-devices button.is-active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.preview-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.preview-shell[data-device="mobile"] {
  max-width: 270px;
  margin-inline: auto;
}
.preview-browser {
  overflow: hidden;
  border-radius: inherit;
}

/* Mini sitio dentro de la vista previa. Escala tipográfica intencionalmente pequeña. */
.pv {
  background: var(--pv-surface);
  color: var(--pv-ink);
  font-family: var(--font-sans);
  font-size: 8px;
  line-height: 1.4;
}
.pv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--pv-ink) 12%, transparent);
}
.pv-logo {
  color: var(--pv-ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}
.pv-logo img {
  max-height: 20px;
  width: auto;
}
.pv-links {
  display: flex;
  gap: 7px;
  color: color-mix(in srgb, var(--pv-ink) 70%, transparent);
  font-size: 6.5px;
}
.pv-cta {
  padding: 5px 8px;
  border-radius: var(--pill);
  background: var(--pv-brand);
  color: var(--pv-surface);
  font-size: 6.5px;
  font-weight: 700;
}
.pv-hero {
  position: relative;
  min-height: 148px;
  padding: 16px 12px 12px;
  background-color: var(--pv-brand);
  background-size: cover;
  background-position: center;
}
.pv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--pv-ink) 82%, transparent), color-mix(in srgb, var(--pv-ink) 22%, transparent));
}
.pv-hero-copy {
  position: relative;
  z-index: 1;
}
.pv-region {
  color: color-mix(in srgb, var(--pv-surface) 84%, transparent);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pv-title {
  max-width: 22ch;
  margin-top: 5px;
  color: var(--pv-surface);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pv-sub {
  max-width: 30ch;
  margin-top: 5px;
  color: color-mix(in srgb, var(--pv-surface) 90%, transparent);
  font-size: 7px;
  line-height: 1.45;
}
.pv-search {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr auto;
  gap: 3px;
  margin-top: 12px;
  padding: 4px;
  background: var(--pv-surface);
  border-radius: 3px;
}
.pv-search span {
  display: grid;
  gap: 1px;
  padding: 3px 4px;
  border: 1px solid color-mix(in srgb, var(--pv-ink) 14%, transparent);
  border-radius: 2px;
  color: color-mix(in srgb, var(--pv-ink) 62%, transparent);
  font-size: 5.5px;
}
.pv-search b {
  color: var(--pv-ink);
  font-size: 6.5px;
}
.pv-search .pv-go {
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 0;
  border-radius: 2px;
  background: var(--pv-brand);
  color: var(--pv-surface);
  font-size: 6px;
  font-weight: 700;
}
.pv-body {
  padding: 12px 10px;
}
.pv-section-title {
  color: var(--pv-ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
}
.pv-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 7px;
}
.pv-card {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pv-ink) 12%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--pv-surface) 94%, white);
}
.pv-card-img {
  width: 100%;
  height: 44px;
  object-fit: cover;
  background: var(--pv-brand-soft, var(--pv-brand));
}
.pv-card-body {
  padding: 5px;
}
.pv-card-body strong {
  display: block;
  overflow: hidden;
  color: var(--pv-ink);
  font-size: 7px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pv-card-body small {
  display: block;
  margin-top: 1px;
  color: color-mix(in srgb, var(--pv-ink) 66%, transparent);
  font-size: 5.5px;
}
.pv-card-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  margin-top: 4px;
}
.pv-card-price b {
  color: var(--pv-ink);
  font-size: 8px;
}
.pv-card-price span {
  color: color-mix(in srgb, var(--pv-ink) 60%, transparent);
  font-size: 5px;
}
.pv-footer {
  padding: 8px 10px;
  border-top: 1px solid color-mix(in srgb, var(--pv-ink) 12%, transparent);
  color: color-mix(in srgb, var(--pv-ink) 62%, transparent);
  font-size: 5.5px;
  text-align: center;
}

/* Cada plantilla base tiene una composición distinta también en la miniatura. */
.pv--boldo .pv-nav {
  background: color-mix(in srgb, var(--pv-surface) 96%, white);
}
.pv--boldo .pv-card {
  border-radius: 3px;
}
.pv--boldo .pv-title {
  font-size: 16px;
}

.pv--casona .pv-nav {
  gap: 6px;
  background: color-mix(in srgb, var(--pv-surface) 90%, white);
}
.pv--casona .pv-logo {
  font-size: 11px;
}
.pv--casona .pv-cta {
  border-radius: 0;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--pv-ink) 30%, transparent);
  color: var(--pv-ink);
}
.pv--casona .pv-hero {
  min-height: 156px;
  padding: 20px 14px 12px;
}
.pv--casona .pv-region {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 6px;
  letter-spacing: 0.2em;
}
.pv--casona .pv-region::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--pv-accent);
}
.pv--casona .pv-title {
  max-width: 19ch;
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.04;
}
.pv--casona .pv-search {
  margin-top: 14px;
  border-radius: 0;
}
.pv--casona .pv-search span,
.pv--casona .pv-search .pv-go {
  border-radius: 0;
}
.pv--casona .pv-search .pv-go {
  background: var(--pv-ink);
}
.pv--casona .pv-promo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-bottom: 1px solid color-mix(in srgb, var(--pv-ink) 12%, transparent);
  background: color-mix(in srgb, var(--pv-surface) 92%, white);
  color: color-mix(in srgb, var(--pv-ink) 78%, transparent);
  font-size: 6px;
}
.pv--casona .pv-promo b {
  color: var(--pv-ink);
  font-size: 7px;
}
.pv--casona .pv-promo i {
  margin-left: auto;
  color: var(--pv-accent);
  font-style: normal;
  font-weight: 700;
}
.pv--casona .pv-card {
  border-radius: 0;
}
.pv--casona .pv-card-img {
  height: 48px;
}
.pv--casona .pv-card-link {
  display: block;
  margin-top: 4px;
  color: var(--pv-accent);
  font-size: 5.5px;
  font-weight: 700;
}

.pv--trancas .pv-nav {
  background: var(--pv-ink);
  border-bottom: 0;
}
.pv--trancas .pv-logo {
  color: var(--pv-surface);
}
.pv--trancas .pv-links {
  color: color-mix(in srgb, var(--pv-surface) 72%, transparent);
}
.pv--trancas .pv-cta {
  border-radius: 0;
  background: var(--pv-accent);
  color: var(--pv-surface);
}
.pv--trancas .pv-hero {
  min-height: 152px;
}
.pv--trancas .pv-title {
  max-width: 20ch;
  font-size: 18px;
}
.pv--trancas .pv-search .pv-go {
  border-radius: 0;
  background: var(--pv-accent);
}
.pv--trancas .pv-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: color-mix(in srgb, var(--pv-ink) 22%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--pv-ink) 20%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--pv-ink) 20%, transparent);
}
.pv--trancas .pv-pillars span {
  display: grid;
  gap: 1px;
  padding: 5px 6px;
  background: var(--pv-brand);
  color: var(--pv-surface);
}
.pv--trancas .pv-pillars b {
  font-size: 6px;
  font-weight: 700;
}
.pv--trancas .pv-pillars i {
  color: color-mix(in srgb, var(--pv-surface) 72%, transparent);
  font-size: 5px;
  font-style: normal;
}
.pv--trancas .pv-card {
  border-radius: 0;
}
.pv--trancas .pv-card-btn {
  display: block;
  margin-top: 4px;
  padding: 2px 0;
  background: var(--pv-accent);
  color: var(--pv-surface);
  font-size: 5.5px;
  font-weight: 700;
  text-align: center;
}
.preview-shell[data-device="desktop"] .pv-hero {
  min-height: 160px;
}

/* Diálogo móvil de vista previa */
.preview-dialog {
  width: min(92vw, 380px);
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overscroll-behavior: contain;
}
.preview-dialog::backdrop {
  background: color-mix(in srgb, var(--dark) 58%, transparent);
}
.preview-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.preview-dialog-head p {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.preview-dialog .preview-shell {
  margin: 12px;
  border-radius: var(--radius);
}

/* Transición de paso -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .ob-panel.is-entering {
    animation: ob-in 320ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes ob-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Responsive ---------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ob-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .ob-aside {
    display: none;
  }
  .ob-main {
    max-width: 820px;
    margin-inline: auto;
  }
  .ob-preview-link {
    display: inline-flex;
  }
  .ob-body {
    padding-bottom: 96px;
  }
  .ob-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-inline: -16px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 -8px 24px -20px rgba(20, 33, 30, 0.45);
  }
}
@media (max-width: 720px) {
  .grid-2,
  .template-grid,
  .palette-grid,
  .next-steps ul {
    grid-template-columns: 1fr;
  }
  .template-grid {
    gap: 10px;
  }
  .template-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
  }
  .template-card img {
    height: 100%;
    aspect-ratio: auto;
  }
  .ob-header-actions .save-status {
    display: none;
  }
  .ob-header-actions {
    gap: 10px;
  }
  .ob-header .btn--sm {
    padding-inline: 8px;
  }
  .ob-step-label {
    font-size: 0.8rem;
  }
  .ob-time {
    display: none;
  }
  /* Una sola fila: Atrás + acción principal. Nada flota encima de los botones. */
  .ob-actions {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .ob-actions-right {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .ob-next-hint {
    display: none;
  }
  #back {
    flex: 0 0 auto;
    width: auto;
  }
  #next {
    flex: 1;
    min-width: 0;
  }
  .url-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .success-actions .btn {
    width: 100%;
  }
  .palette-card {
    padding: 8px;
  }
  .swatches i {
    width: 11px;
  }
  .dropzone--logo {
    max-width: none;
  }
}
@media (max-width: 420px) {
  .ob-panel {
    padding: 18px 16px;
  }
  .ob-panel h1,
  .ob-panel h2 {
    font-size: 1.65rem;
  }
  .ob-stepper {
    gap: 2px;
  }
  .ob-stepper button {
    gap: 4px;
    padding: 4px 1px;
    font-size: 0.63rem;
  }
  .ob-stepper button span {
    width: 20px;
    height: 20px;
    font-size: 0.64rem;
  }
}

/* Moneda del alojamiento: la etiqueta cambia según el país elegido en el paso 1. */
[data-only-intl] {
  display: none !important;
}
html[data-currency="usd"] [data-only-intl] {
  display: revert !important;
}
html[data-currency="usd"] [data-only-cl] {
  display: none !important;
}

/* =================================================================================================
   Identidad visual de la landing (Hostfully) aplicada al asistente.
   Solo dentro de `.hf-ob`: las páginas legales siguen con brand.css intacto. La vista previa del
   sitio (`.pv`) usa sus propias variables --pv-*, así que no se ve afectada: debe mostrar la paleta
   que eligió el cliente, no la de Anfitrion Pro.
   ================================================================================================= */
body.hf-ob {
  /* Paleta Hostfully */
  --hf-bg: #f6f4f2;
  --hf-white: #ffffff;
  --hf-primary: #2d2aa5;
  --hf-primary-hover: #26248d;
  --hf-purple: #8a5bda;
  --hf-purple-tint: #e2d9f3;
  --hf-mint: #31b48d;
  --hf-mint-tint: #d8f0e8;
  --hf-amber: #ffc454;
  --hf-sky: #e7f1ff;
  --hf-sky-deep: #d2e4fc;
  --hf-line: #e5e7eb;
  --hf-muted: #5b6270;
  --hf-ink: #19172a;

  /* Tokens compartidos que consumen los componentes del asistente */
  --surface: #f6f4f2;
  --surface-2: #ffffff;
  --surface-3: #e7f1ff;
  --ink: #19172a;
  --ink-soft: #5b6270;
  --brand: #2d2aa5;
  --brand-deep: #19172a;
  --brand-tint: #e2d9f3;
  --accent: #8a5bda;
  --line: #e5e7eb;
  --white: #ffffff;
  --dark: #19172a;
  --on-dark: #ffffff;
  --ok: #1f9c78;
  --error: #d92d20;
  --focus: #2d2aa5;

  /* Geometría y tipografía: sin serif, esquinas muy redondeadas. */
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 36px;
  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;

  background: var(--hf-bg);
}

.hf-ob h1,
.hf-ob h2,
.hf-ob h3,
.hf-ob h4,
.hf-ob legend {
  font-family: var(--font-sans);
  color: var(--hf-ink, #19172a);
  letter-spacing: -0.025em;
}

/* Header --------------------------------------------------------------------------------------- */
.hf-ob .ob-header {
  border-bottom: 1px solid rgba(45, 42, 165, 0.08);
  background: rgba(246, 244, 242, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.hf-ob .ob-header-inner {
  min-height: 76px;
}
.hf-ob .ob-header .brand {
  min-height: 44px;
  color: #036773;
  flex-shrink: 0;
  white-space: nowrap;
  gap: 9px;
}
.hf-ob .hf-brand__text {
  white-space: nowrap;
}
.hf-ob .save-status {
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--hf-muted);
  font-size: 0.74rem;
}
.hf-ob .save-status[data-tone="saved"] {
  background: var(--hf-mint-tint);
  color: #0f7a5f;
}
.hf-ob .save-status[data-tone="saving"] {
  background: var(--hf-purple-tint);
  color: var(--hf-primary);
}
.hf-ob .ob-preview-link {
  border: 1.5px solid rgba(45, 42, 165, 0.24);
  background: #ffffff;
  color: var(--hf-primary);
  font-weight: 700;
}
.hf-ob .ob-preview-link:hover {
  border-color: var(--hf-primary);
}
.hf-ob .btn--text {
  color: var(--hf-primary);
  text-decoration: none;
  font-weight: 700;
}
.hf-ob .btn--text:hover {
  background: rgba(45, 42, 165, 0.06);
  border-radius: 999px;
  color: var(--hf-primary-hover);
}

/* Botones -------------------------------------------------------------------------------------- */
.hf-ob .btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hf-ob .btn:not(.btn--ghost):not(.btn--text):not(.btn--on-dark) {
  background: var(--hf-mint);
  border-color: var(--hf-mint);
  color: #ffffff;
  box-shadow: 0 8px 20px -8px rgba(49, 180, 141, 0.5);
}
.hf-ob .btn:not(.btn--ghost):not(.btn--text):not(.btn--on-dark):hover {
  background: var(--hf-primary);
  border-color: var(--hf-primary);
  box-shadow: 0 10px 24px -8px rgba(45, 42, 165, 0.42);
}
.hf-ob .btn--ghost {
  background: #ffffff;
  border: 1.5px solid rgba(45, 42, 165, 0.22);
  color: var(--hf-primary);
}
.hf-ob .btn--ghost:hover {
  background: rgba(45, 42, 165, 0.06);
  border-color: var(--hf-primary);
  color: var(--hf-primary);
}

/* Progreso ------------------------------------------------------------------------------------- */
.hf-ob .ob-progress {
  padding: 18px 20px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 10px 30px -22px rgba(25, 23, 42, 0.16);
}
.hf-ob .ob-step-label {
  color: var(--hf-ink, #19172a);
  font-size: 0.82rem;
}
.hf-ob .ob-step-label strong {
  color: var(--hf-primary);
}
.hf-ob .ob-time {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hf-sky);
  color: var(--hf-primary);
  font-size: 0.72rem;
  font-weight: 700;
}
.hf-ob .ob-bar {
  height: 8px;
  background: var(--hf-sky);
}
.hf-ob .ob-bar span {
  background: linear-gradient(90deg, #2d2aa5 0%, #40caa1 100%);
}
.hf-ob .ob-stepper button {
  color: var(--hf-muted);
  font-weight: 600;
}
.hf-ob .ob-stepper button span {
  width: 26px;
  height: 26px;
  border: 1.5px solid rgba(45, 42, 165, 0.2);
  background: #ffffff;
  color: var(--hf-primary);
}
.hf-ob .ob-stepper button[aria-current="step"] {
  color: var(--hf-primary);
}
.hf-ob .ob-stepper button[aria-current="step"] span {
  border-color: var(--hf-primary);
  background: var(--hf-primary);
  color: #ffffff;
}
.hf-ob .ob-stepper button[data-done="true"] span {
  border-color: var(--hf-mint);
  background: var(--hf-mint-tint);
  color: #0f7a5f;
}

/* Paneles y formularios ------------------------------------------------------------------------ */
.hf-ob .ob-panel {
  border: 0;
  border-radius: 40px;
  padding: clamp(24px, 3.4vw, 44px);
  box-shadow: 0 18px 48px -34px rgba(25, 23, 42, 0.28);
}
.hf-ob .ob-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--hf-purple-tint);
  color: var(--hf-primary);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.hf-ob .ob-lead {
  color: var(--hf-muted);
}
.hf-ob .field > label,
.hf-ob .field > .label,
.hf-ob .ob-fieldset legend {
  color: var(--hf-ink, #19172a);
  font-size: 0.88rem;
}
.hf-ob .input,
.hf-ob .select,
.hf-ob .textarea {
  border: 1.5px solid #e3e6ec;
  border-radius: 16px;
  background: #ffffff;
  color: var(--hf-ink, #19172a);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.hf-ob .input::placeholder,
.hf-ob .textarea::placeholder {
  color: #98a0ae;
}
.hf-ob .input:hover,
.hf-ob .select:hover,
.hf-ob .textarea:hover {
  border-color: #c9ced8;
}
.hf-ob .input:focus,
.hf-ob .select:focus,
.hf-ob .textarea:focus {
  border-color: var(--hf-primary);
  outline: 3px solid rgba(45, 42, 165, 0.14);
  outline-offset: 0;
}
.hf-ob .input-group .prefix,
.hf-ob .input-group .suffix {
  border-color: #e3e6ec;
  background: var(--hf-bg);
  color: var(--hf-muted);
  font-weight: 600;
}
.hf-ob .password-toggle {
  background: var(--hf-sky);
  color: var(--hf-primary);
  font-weight: 700;
}
.hf-ob .why,
.hf-ob .hint {
  color: var(--hf-muted);
}
.hf-ob .plan-chip {
  border: 0;
  border-radius: 20px;
  background: var(--hf-sky);
  color: var(--hf-muted);
  padding: 14px 18px;
}
.hf-ob .plan-chip strong {
  color: var(--hf-primary);
}
.hf-ob .plan-chip a {
  color: var(--hf-primary);
}

/* Plantillas, paletas y color propio ----------------------------------------------------------- */
.hf-ob .template-card {
  border: 2px solid #e9e7e3;
  border-radius: 24px;
  background: #ffffff;
}
.hf-ob .template-card:hover {
  border-color: rgba(45, 42, 165, 0.35);
}
.hf-ob .template-card:has(input:checked) {
  border-color: var(--hf-mint);
  box-shadow: 0 0 0 4px rgba(49, 180, 141, 0.16);
}
.hf-ob .template-body strong {
  color: var(--hf-ink, #19172a);
}
.hf-ob .palette-card {
  border: 2px solid #e9e7e3;
  border-radius: 18px;
  background: #ffffff;
}
.hf-ob .palette-card:hover {
  border-color: rgba(45, 42, 165, 0.35);
}
.hf-ob .palette-card:has(input:checked) {
  border-color: var(--hf-mint);
  box-shadow: 0 0 0 4px rgba(49, 180, 141, 0.16);
}
.hf-ob .palette-card strong {
  color: var(--hf-ink, #19172a);
}
.hf-ob .custom-color {
  border-top: 1px solid rgba(25, 23, 42, 0.08);
}
.hf-ob .custom-color summary {
  color: var(--hf-primary);
}
.hf-ob .custom-color-row input[type="color"] {
  border-radius: 12px;
  border-color: #e3e6ec;
}

/* Zonas de carga -------------------------------------------------------------------------------- */
.hf-ob .dropzone {
  border: 1.5px dashed #d5d9e2;
  border-radius: 24px;
  background: var(--hf-bg);
}
.hf-ob .dropzone:hover,
.hf-ob .dropzone.is-dragging {
  border-color: var(--hf-mint);
  background: rgba(49, 180, 141, 0.06);
}
.hf-ob .dropzone-filled img {
  border-radius: 16px;
}
.hf-ob .logo-sample {
  font-family: var(--font-sans);
  font-weight: 800;
  color: #036773;
}

/* Pago ------------------------------------------------------------------------------------------ */
.hf-ob .transfer-preview {
  border: 0;
  border-radius: 28px;
  background: var(--hf-sky);
}
.hf-ob .transfer-title {
  border-bottom: 0;
  background: transparent;
  color: var(--hf-purple);
  padding-bottom: 0;
}
.hf-ob .transfer-body dl div {
  border-bottom: 1px solid rgba(45, 42, 165, 0.12);
}
.hf-ob .terms-check a {
  color: var(--hf-primary);
}

/* Acciones y pantalla final --------------------------------------------------------------------- */
.hf-ob .ob-actions .btn:not(.btn--ghost) {
  background: var(--hf-mint);
  border-color: var(--hf-mint);
}
.hf-ob .ob-next-hint {
  color: var(--hf-muted);
}
.hf-ob .success-mark {
  width: 62px;
  height: 62px;
  background: var(--hf-mint-tint);
  color: #0f7a5f;
  font-size: 1.8rem;
}
.hf-ob .url-box {
  border: 0;
  border-radius: 20px;
  background: var(--hf-sky);
}
.hf-ob .url-box span {
  color: var(--hf-primary);
}
.hf-ob .next-steps {
  border-top: 1px solid rgba(25, 23, 42, 0.08);
}
.hf-ob .next-steps li::before {
  content: "✓";
  color: var(--hf-mint);
  font-weight: 800;
}

/* Vista previa ---------------------------------------------------------------------------------- */
.hf-ob .preview-toolbar p {
  color: var(--hf-purple);
}
.hf-ob .preview-devices {
  border-color: #e3e6ec;
  background: #ffffff;
}
.hf-ob .preview-devices button {
  color: var(--hf-muted);
}
.hf-ob .preview-devices button.is-active {
  background: var(--hf-primary);
  color: #ffffff;
  box-shadow: none;
}
.hf-ob .preview-shell {
  border: 1px solid #e3e6ec;
  border-radius: 24px;
  box-shadow: 0 18px 48px -30px rgba(25, 23, 42, 0.3);
}
.hf-ob .preview-dialog {
  border: 0;
  border-radius: 28px;
  background: var(--hf-bg);
}
.hf-ob .preview-dialog-head p {
  color: var(--hf-purple);
}

/* Barra de acciones fija en móvil --------------------------------------------------------------- */@media (max-width: 1100px) {
  .hf-ob .ob-actions {
    border-top: 1px solid rgba(25, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 -10px 28px -24px rgba(25, 23, 42, 0.45);
  }
}

@media (max-width: 720px) {
  .hf-ob .ob-header-inner {
    min-height: 66px;
    gap: 10px;
  }
  .hf-ob .hf-brand__mark {
    width: 36px;
    height: 36px;
  }
  .hf-ob .hf-brand__text {
    font-size: 1rem;
  }
  .hf-ob .ob-header .btn--sm {
    font-size: 0.78rem;
  }
  .hf-ob .hf-brand__text {
    font-size: 0.95rem;
  }
  .hf-ob .ob-preview-link {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .hf-ob .ob-panel {
    border-radius: 28px;
  }
  .hf-ob .ob-progress {
    padding: 14px 16px;
    border-radius: 22px;
  }
  .hf-ob .ob-bar {
    height: 6px;
  }
  .hf-ob .ob-stepper button span {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 380px) {
  /* Bajo 380px el wordmark no cabe junto a «Vista previa» y «Guardar y salir». */
  .hf-ob .hf-brand__text {
    display: none;
  }
  .hf-ob .hf-brand__mark {
    width: 34px;
    height: 34px;
  }
  .hf-ob .ob-header-actions {
    gap: 8px;
  }
  .hf-ob .ob-header .btn--sm {
    font-size: 0.74rem;
    padding-inline: 6px;
  }
}

/* Notas informativas: tarjeta celeste, sin borde (Hostfully). */
.hf-ob .note {
  border: 0;
  border-radius: 18px;
  background: var(--hf-sky);
  color: var(--hf-muted);
  padding: 14px 18px;
}
.hf-ob .note strong {
  color: var(--hf-primary);
}
.hf-ob #email-note {
  margin-top: 14px;
}
