:root {
  --azul: #037ac4;
  --texto: #1d2733;
  --suave: #5b6876;
  --borde: #d6dde5;
  --fondo: #f3f6f9;
  --tarjeta: #ffffff;
  --error: #b42318;
  --ok: #067647;
  --marca: #037ac4;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texto); background: var(--fondo); line-height: 1.45; }
.contenedor { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.encabezado { background: linear-gradient(120deg, #023e70, var(--azul)); color: #fff; padding: 28px 0 32px; }
.encabezado h1 { margin: 4px 0 8px; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.marca { margin: 0; font-weight: 700; letter-spacing: .04em; opacity: .9; }
.intro { margin: 0; max-width: 640px; opacity: .95; }
.rejilla { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-top: 24px; padding-bottom: 48px; align-items: start; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
h2 { margin: 0 0 4px; font-size: 1.15rem; }
.ayuda { color: var(--suave); font-size: .9rem; margin: 0 0 12px; }
.centro { text-align: center; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
input[type=text], input:not([type]), input[type=email], input[type=url] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1px solid var(--borde); border-radius: 8px; background: #fff; color: var(--texto);
}
input:focus { outline: 2px solid var(--azul); outline-offset: 1px; }
input.invalido { border-color: var(--error); }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cuenta { float: right; font-weight: 400; color: var(--suave); font-size: .8rem; }
.fila-color { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.fila-color input[type=color] { width: 48px; height: 42px; padding: 2px; border: 1px solid var(--borde); border-radius: 8px; background: #fff; }
.fila-color input:not([type=color]) { margin-top: 0; max-width: 140px; text-transform: uppercase; }
#aviso-color { display: block; font-weight: 400; margin-top: 6px; }
#aviso-color.mal { color: var(--error); }
.recorte { border-top: 1px solid var(--borde); padding-top: 14px; margin-top: 14px; }
.titulo-recorte { font-weight: 600; margin: 0 0 8px; }
.titulo-recorte small { font-weight: 400; color: var(--suave); }
.lienzo-caja { margin: 10px 0; border: 1px dashed var(--borde); border-radius: 8px; overflow: hidden; background: repeating-conic-gradient(#eef1f4 0 25%, #fff 0 50%) 0 0 / 16px 16px; touch-action: none; cursor: grab; }
.lienzo-caja canvas { display: block; width: 100%; height: auto; }
.lienzo-caja.cuadrado { max-width: 240px; }
.zoom { width: 100%; max-width: 360px; }
.estado.ok { color: var(--ok); }
.estado.mal { color: var(--error); }
.casilla { display: flex; gap: 10px; font-weight: 400; align-items: flex-start; }
.casilla input { margin-top: 4px; }
.cf-turnstile { margin: 8px 0 16px; min-height: 65px; }
button { font: inherit; font-weight: 700; color: #fff; background: var(--azul); border: 0; border-radius: 8px; padding: 12px 28px; cursor: pointer; width: 100%; }
button:disabled { opacity: .6; cursor: wait; }
.errores { background: #fef3f2; border: 1px solid #fecdca; color: var(--error); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
.errores ul { margin: 6px 0 0; padding-left: 18px; }
.exito { max-width: 640px; margin: 32px auto; padding: 0 16px; }
.exito h2 { color: var(--ok); }

/* vista previa tipo teléfono */
.vista { position: sticky; top: 16px; }
.telefono { border: 10px solid #e9ecef; border-radius: 36px; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.08); overflow: hidden; }
.pantalla { min-height: 560px; font-size: 13px; }
.barra { margin: 0; padding: 14px 14px 10px; color: #333; }
.v-banner { aspect-ratio: 1440 / 448; background: linear-gradient(120deg, #0b3d91, #1565c0); background-size: cover; background-position: center; }
.v-logo { width: 64px; height: 64px; margin: -32px auto 0; border-radius: 16px; background: #fff center / cover no-repeat; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); position: relative; }
.v-nombre { text-align: center; font-weight: 700; font-size: 16px; margin: 8px 12px 2px; word-break: break-word; }
.v-desc { text-align: center; color: #555; margin: 0 12px 12px; word-break: break-word; }
.v-acciones { display: flex; justify-content: space-around; color: var(--marca); font-weight: 600; text-align: center; font-size: 12px; padding: 0 8px 10px; }
.v-acciones span { line-height: 1.6; }
.v-tabs { display: flex; border-bottom: 1px solid #e5e5e5; }
.v-tabs span { flex: 1; text-align: center; padding: 8px 0; color: #555; }
.v-tabs .activa { color: #111; font-weight: 600; border-bottom: 3px solid var(--marca); }
.v-info { list-style: none; margin: 0; padding: 0 14px; }
.v-info li { padding: 10px 0; border-bottom: 1px solid #eee; }
.v-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-info small { color: #666; }

@media (max-width: 860px) {
  .rejilla { grid-template-columns: 1fr; }
  .vista { position: static; max-width: 340px; margin: 0 auto; width: 100%; }
}
@media (max-width: 520px) {
  .dos { grid-template-columns: 1fr; gap: 0; }
}
