/* Herramientas PDF: se apoya en calculadoras.css (cabecera, héroe, tarjetas, botones) y agrega el área de trabajo. */
.herramientas-pdf .hp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.herramientas-pdf .hp-tarjeta { padding-top: 24px; }
.herramientas-pdf .hp-ico { width: 38px; height: 38px; margin-bottom: 10px; padding: 8px; border-radius: 10px; color: var(--acento); background: rgb(11 99 181 / 0.09); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.herramientas-pdf .hp-tarjeta:hover .hp-ico { color: #fff; background: linear-gradient(180deg, rgb(56 178 232 / 0.7), var(--acento)); }
.herramientas-pdf .hp-tarjeta h2 { margin-top: 10px; font-size: 17px; }

/* Área de trabajo */
.herramientas-pdf .hp-panel { margin: 22px 0 18px; border: 1px solid var(--borde); border-radius: 14px; background: #fff; box-shadow: var(--sombra-tarjeta); padding: 22px; min-width: 0; }
.herramientas-pdf #hp-app.hp-arrastrando .hp-soltar { border-color: var(--acento); background: rgb(11 99 181 / 0.06); }
.hp-soltar { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 42px 18px; border: 2px dashed #b8c4d4; border-radius: 12px; background: var(--perla, #f2f5f8); transition: border-color .2s, background .2s; }
.hp-nube { width: 56px; height: 56px; padding: 12px; border-radius: 16px; color: #fff; background: linear-gradient(180deg, rgb(56 178 232 / 0.75), var(--acento)); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; box-shadow: 0 12px 24px -12px rgb(11 99 181 / 0.8); }
.hp-soltar-t { margin: 8px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.hp-o { margin: 0; color: var(--suave); font-size: 13px; }
.hp-nota { margin: 8px 0 0; color: var(--suave); font-size: 13px; max-width: 60ch; }
.herramientas-pdf .hp-grande { min-height: 48px; padding: 12px 26px; font-size: 16px; }
.hp-titulo { margin: 18px 0 10px; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; color: var(--suave); font-family: "Fira Sans", sans-serif; font-weight: 600; }
.hp-titulo:first-of-type { margin-top: 0; }

.hp-salidas { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.hp-salidas li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--borde); border-radius: 12px; background: #fff; }
.hp-mini-salida { display: grid; place-items: center; width: 62px; height: 80px; overflow: hidden; border-radius: 6px; background: var(--perla, #f2f5f8); }
.hp-mini-salida img { max-width: 100%; max-height: 100%; box-shadow: 0 2px 8px rgb(15 23 41 / .2); }
.hp-salidas .calc-principal { min-height: 46px; padding: 10px 22px; }
.hp-nombre { display: grid; min-width: 0; }
.hp-nombre strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hp-nombre small { color: var(--suave); font-size: 12px; }
.hp-icono { display: inline-grid; place-items: center; min-width: 30px; height: 20px; padding: 0 6px; border-radius: 5px; font: 700 10px "Fira Mono", monospace; color: #fff; background: linear-gradient(180deg, #f0b27a, var(--cobre)); }

/* Con archivos cargados: lienzo con tarjetas a la izquierda y panel de opciones a la derecha (como iLovePDF) */
.hp-taller { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.hp-lienzo { position: relative; min-width: 0; min-height: 380px; padding: 18px; border-radius: 12px; background: var(--perla, #f2f5f8); }
.hp-lienzo > * + * { margin-top: 16px; }
.hp-tarjetas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px; }
.hp-acciones-lienzo { position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; flex-direction: column; gap: 10px; margin: 0 !important; }
.hp-acciones-lienzo + .hp-tarjetas { margin-right: 62px; }
.herramientas-pdf .hp-flotante { position: relative; display: grid; place-items: center; width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 0; border: 0; border-radius: 50%; color: #fff; font: 700 26px/1 "Fira Sans", sans-serif; background: linear-gradient(180deg, #f0b27a, var(--cobre)); box-shadow: 0 6px 16px -4px rgb(15 23 41 / .45); cursor: pointer; }
.herramientas-pdf .hp-flotante:hover { filter: brightness(1.06); transform: translateY(-1px); }
.herramientas-pdf .hp-az { font-size: 13px; letter-spacing: -0.02em; background: #fff; color: var(--tinta); border: 1px solid #c8d1dd; }
.hp-cuenta-archivos { position: absolute; top: -6px; left: -6px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 11px; background: var(--tinta, #0f1729); color: #fff; font: 700 12px "Fira Sans", sans-serif; }
.hp-fila { position: relative; display: grid; grid-template-rows: auto auto; gap: 8px; padding: 10px; border: 1px solid var(--borde); border-radius: 12px; background: #fff; box-shadow: var(--sombra-suave); text-align: center; align-content: start; }
.hp-fila-error { border-color: #d6877a; background: #fff6f4; }
.hp-fila .hp-icono { position: absolute; top: 10px; left: 10px; z-index: 1; }
.hp-fila .hp-nombre { text-align: center; }
.hp-fila .hp-error { margin: 0; text-align: left; font-size: 12px; }
.hp-mini-archivo { display: grid; place-items: center; height: 168px; overflow: hidden; border-radius: 6px; background: var(--perla, #f2f5f8); }
.hp-mini-archivo img { max-width: 100%; max-height: 168px; box-shadow: 0 2px 8px rgb(15 23 41 / .22); }
.hp-hoja-vacia { width: 96px; height: 128px; border-radius: 4px; background: linear-gradient(#fff, #fff) padding-box; border: 1px solid #d3dbe6; box-shadow: 0 2px 6px rgb(15 23 41 / .1); }
.hp-candado { width: 52px; height: 52px; fill: none; stroke: var(--suave); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hp-orden { position: absolute; left: 10px; top: 36px; z-index: 1; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; font: 700 12px "Fira Sans", sans-serif; color: #fff; background: var(--acento); box-shadow: 0 2px 6px rgb(15 23 41 / .3); }
.herramientas-pdf .hp-quitar { position: absolute; top: 6px; right: 6px; z-index: 2; display: grid; place-items: center; width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 50%; border: 1px solid #e0b3ab; background: #fff; color: #a33a2a; font-size: 18px; line-height: 1; box-shadow: 0 2px 6px rgb(15 23 41 / .2); }
.hp-mover { position: absolute; top: 8px; left: 50%; z-index: 2; display: inline-flex; gap: 4px; transform: translateX(-50%); opacity: 0; transition: opacity .15s; }
.hp-fila:hover .hp-mover, .hp-fila:focus-within .hp-mover { opacity: 1; }
.herramientas-pdf .hp-mover button { display: grid; place-items: center; min-height: 28px; min-width: 28px; width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; background: #fff; box-shadow: 0 2px 6px rgb(15 23 41 / .25); }
.hp-desbloqueado { justify-self: center; padding: 1px 8px; border-radius: 10px; color: #0a6b2c; background: #e5f6ea; font-size: 12px; font-weight: 600; }
.hp-fila-clave { border-style: dashed; border-color: #b8c4d4; }
.hp-fila .hp-clave { display: grid; gap: 6px; }
.hp-fila .hp-clave input { min-width: 0; font-size: 13px; }
.hp-fila .hp-clave .hp-boton { min-height: 34px; }
/* Herramientas con vista propia (firmar, editar…): el archivo va en una fila compacta arriba */
.hp-tarjetas.hp-compacta { grid-template-columns: 1fr; }
.hp-compacta .hp-fila { grid-template-columns: 54px minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; gap: 12px; text-align: left; padding: 8px 40px 8px 10px; }
.hp-compacta .hp-mini-archivo { height: 70px; }
.hp-compacta .hp-mini-archivo img { max-height: 70px; }
.hp-compacta .hp-hoja-vacia { width: 40px; height: 54px; }
.hp-compacta .hp-icono { display: none; }
.hp-compacta .hp-nombre { text-align: left; }
.hp-compacta .hp-clave { grid-column: 1 / -1; grid-template-columns: 1fr auto; }

.hp-lateral { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 108px); overflow: auto; padding: 18px; border: 1px solid var(--borde); border-radius: 12px; background: #fff; }
.hp-lateral-titulo { margin: 0; text-align: center; font-size: 21px; letter-spacing: -0.02em; }
.hp-pista { margin: 0; padding: 10px 12px; border: 1px solid #bcd9f3; border-radius: 8px; background: #eaf4fd; color: #134a7c; font-size: 14px; }
.hp-pista-suave { border-color: var(--borde); background: var(--perla, #f2f5f8); color: var(--suave); font-size: 13px; }
.hp-lateral .hp-titulo { margin: 4px 0 0; }
.hp-lateral .hp-form { grid-template-columns: 1fr; margin-bottom: 0; }
.hp-lateral .hp-pie { position: sticky; bottom: -18px; margin: auto -18px -18px; padding: 14px 18px 18px; display: grid; gap: 8px; background: linear-gradient(rgb(255 255 255 / 0), #fff 22%); }
.herramientas-pdf .hp-accion { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; font-size: 18px; }
.hp-flecha { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hp-lateral .hp-progreso { width: 100%; }

/* Opciones como tarjetas (nivel de compresión) */
.hp-etiqueta-grupo { font-size: 13px; font-weight: 600; }
.hp-opciones-tarjeta { display: grid; gap: 10px; }
.hp-opcion-tarjeta { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #c8d1dd; border-radius: 10px; background: #fff; cursor: pointer; }
.hp-opcion-tarjeta:hover { border-color: #8fa3bb; }
.hp-opcion-tarjeta:has(input:checked) { border-color: var(--acento); box-shadow: 0 0 0 1px var(--acento); background: #f3f9ff; }
.hp-campo .hp-opcion-tarjeta input { flex: none; min-height: 0; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; border: 0; accent-color: var(--acento); }
.hp-opcion-texto { display: grid; gap: 2px; }
.hp-opcion-texto strong { font-size: 15px; }
.hp-opcion-texto small { color: var(--suave); font-size: 13px; }

/* Dividir PDF */
.hp-dividir { display: grid; gap: 14px; }
.hp-dividir .hp-pestanas { justify-content: center; }
.hp-rangos { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hp-rango { width: 100%; max-width: 460px; margin-inline: auto; padding: 12px 14px 14px; border: 2px dashed #aeb9c8; border-radius: 12px; background: #fff; }
.hp-rango-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; min-height: 28px; }
.hp-rango .hp-quitar { position: static; }
.hp-rango-hojas { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px; border-radius: 8px; background: var(--perla, #f2f5f8); }
.hp-rango-pag { margin: 0; text-align: center; }
.hp-rango-pag figcaption { margin-top: 4px; font-size: 12px; color: var(--suave); }
.hp-rango-hoja { display: grid; place-items: center; width: 108px; height: 140px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgb(15 23 41 / .2); }
.hp-rango-hoja img { max-width: 100%; max-height: 100%; }
.hp-rango-puntos { font-size: 22px; letter-spacing: 2px; color: var(--suave); }
.hp-rango-campos { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.hp-rango-campos label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.hp-rango-campos input, .hp-cada input { width: 84px; min-height: 40px; padding: 6px 8px; border: 1px solid #c8d1dd; border-radius: 8px; font: inherit; text-align: right; background: #fff; }
.hp-dividir-acciones { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.hp-dividir-unir { display: inline-flex; align-items: center; gap: 8px; grid-column: auto; font-size: 14px; }
.hp-cada { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; border: 2px dashed #aeb9c8; border-radius: 12px; background: #fff; max-width: 460px; width: 100%; margin-inline: auto; }
.hp-cada label { font-weight: 600; }
.hp-dividir-cuerpo > .hp-ayuda { text-align: center; }
.hp-dividir-resumen { margin: 0; text-align: center; font-weight: 600; }

/* Soltar en cualquier parte de la página */
.hp-velo { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgb(11 99 181 / .16); backdrop-filter: blur(2px); pointer-events: none; }
.hp-velo[hidden] { display: none; }
.hp-velo-caja { display: grid; justify-items: center; gap: 10px; padding: 34px 48px; border: 3px dashed var(--acento); border-radius: 18px; background: #fff; font-size: 22px; box-shadow: 0 20px 60px -20px rgb(15 23 41 / .5); }

.hp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.hp-campo { display: grid; gap: 4px; align-content: start; }
.hp-campo[hidden] { display: none !important; }
.hp-campo label { font-size: 13px; font-weight: 600; }
.hp-campo small { color: var(--suave); font-size: 12px; }
.hp-campo input:not([type="checkbox"]):not([type="color"]), .hp-campo select, .hp-clave input { min-height: 40px; padding: 8px 10px; border: 1px solid #c8d1dd; border-radius: 8px; font: inherit; background: #fff; color: var(--tinta); }
.hp-campo input[type="color"] { width: 64px; height: 40px; padding: 2px; border: 1px solid #c8d1dd; border-radius: 8px; background: #fff; }
.hp-campo input:focus-visible, .hp-campo select:focus-visible, .hp-clave input:focus-visible { outline: 3px solid rgb(11 99 181 / 0.3); outline-offset: 1px; }
.hp-check { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }
.hp-check label { font-weight: 500; }
.hp-check input { width: 18px; height: 18px; }

.hp-pie { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.hp-progreso { width: 180px; height: 10px; accent-color: var(--acento); }
.hp-error { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; color: #8a2a1c; background: #fdeeea; border: 1px solid #e8b3a9; font-size: 14px; }
.hp-avisos:empty { display: none; }

/* Organizar */
.hp-ayuda { margin: 0 0 10px; color: var(--suave); font-size: 14px; }
.hp-paginas { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.hp-pag { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; cursor: grab; text-align: center; }
.hp-pag.hp-sobre { outline: 3px solid var(--acento); }
.hp-pag-quitada { opacity: .45; }
.hp-pag-quitada .hp-miniatura { filter: grayscale(1); }
.hp-miniatura { display: grid; place-items: center; height: 148px; overflow: hidden; border-radius: 6px; background: var(--perla, #f2f5f8); }
.hp-miniatura img { max-width: 100%; max-height: 148px; box-shadow: 0 2px 8px rgb(15 23 41 / .18); transition: transform .2s; }
.hp-num { font-size: 12px; color: var(--suave); }
.hp-acciones-pag { display: flex; justify-content: center; gap: 4px; }
.herramientas-pdf .hp-acciones-pag button { min-height: 30px; min-width: 30px; padding: 0; font-size: 14px; }

/* Resultado */
.hp-resultado { outline: none; display: grid; gap: 12px; }
.hp-resultado h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.hp-cifras { display: flex; gap: 12px; margin: 0; }
.hp-cifras div { padding: 10px 16px; border: 1px solid var(--borde); border-radius: 10px; background: var(--perla, #f2f5f8); }
.hp-cifras dt { font-size: 12px; color: var(--suave); }
.hp-cifras dd { margin: 0; font-size: 20px; font-weight: 700; }
.hp-texto { width: 100%; font: 14px/1.5 "Fira Mono", monospace; border: 1px solid #c8d1dd; border-radius: 8px; padding: 10px; }
.herramientas-pdf .hp-enlace { justify-self: start; border-color: transparent; background: none; box-shadow: none; color: var(--acento); }

/* Cómo se usa y bloques de cierre */
.hp-pasos ol { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hp-pasos li { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--borde); border-radius: 12px; background: #fff; box-shadow: var(--sombra-suave); }
.hp-pasos b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--cobre); font-size: 14px; }
.hp-pasos span { color: var(--suave); font-size: 14px; }
.hp-otras h2 { font-size: 22px; letter-spacing: -0.02em; }
.hp-privacidad { margin-top: 0; }

@media (max-width: 1100px) { .herramientas-pdf .hp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .herramientas-pdf .hp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hp-pasos ol { grid-template-columns: 1fr; } .hp-form { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .herramientas-pdf .hp-grid { grid-template-columns: 1fr; }
  .herramientas-pdf .hp-panel { padding: 14px; }
  .hp-tarjetas { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .hp-soltar { padding: 28px 12px; }
}
/* Pantallas bajas (laptop): el área de trabajo sin tanto aire arriba */
@media (max-height: 800px) and (min-width: 900px) { .hp-soltar { padding: 26px 18px; } .hp-miniatura { height: 120px; } .hp-miniatura img { max-height: 120px; } }
@media (prefers-reduced-motion: reduce) { .hp-miniatura img, .hp-soltar { transition: none; } }

.hp-arrastrable { cursor: grab; }
.hp-fila.hp-moviendo { opacity: .45; }
.hp-fila.hp-sobre { outline: 3px solid var(--acento); outline-offset: 2px; }

/* Firmar PDF */
.hp-firma { display: grid; gap: 10px; margin-top: 8px; }
.hp-crear { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--borde); border-radius: 12px; background: var(--perla, #f2f5f8); }
.hp-pestanas { display: flex; gap: 6px; flex-wrap: wrap; }
.herramientas-pdf .hp-pestana { min-height: 36px; }
.herramientas-pdf .hp-pestana[aria-selected="true"] { color: #fff; background: var(--acento); border-color: transparent; }
.hp-panel-firma { display: grid; gap: 8px; }
.hp-panel-firma[hidden] { display: none !important; }
.hp-pad { width: 100%; max-width: 520px; aspect-ratio: 1040 / 360; background: #fff; border: 1px dashed #aeb9c8; border-radius: 10px; touch-action: none; cursor: crosshair; }
.hp-pad-nombre { cursor: default; }
.hp-nombre-firma, .hp-texto-extra { min-height: 40px; padding: 8px 10px; border: 1px solid #c8d1dd; border-radius: 8px; font: inherit; max-width: 360px; width: 100%; background: #fff; }
.hp-estilos { display: flex; gap: 8px; }
.herramientas-pdf .hp-estilo[aria-pressed="true"] { outline: 3px solid var(--acento); }
.hp-colores { display: flex; gap: 8px; }
.herramientas-pdf .hp-color { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px #aeb9c8; }
.herramientas-pdf .hp-color[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--acento); }
.hp-colores[hidden] { display: none !important; }
.hp-acciones-firma { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hp-previa-firma { max-height: 56px; max-width: 200px; background: repeating-conic-gradient(#e8edf3 0 25%, #fff 0 50%) 0 0 / 12px 12px; border-radius: 6px; }
.hp-previa-firma[hidden] { display: none; }
.hp-barra-firma { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hp-texto-fila { display: inline-flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 240px; }
.hp-nav-pagina { display: flex; align-items: center; gap: 12px; }
.hp-pagina-actual { font-weight: 600; font-size: 14px; }
.hp-escenario { position: relative; width: 100%; max-width: 720px; margin: 0 auto; border: 1px solid var(--borde); box-shadow: 0 6px 24px -10px rgb(15 23 41 / .35); background: #fff; user-select: none; touch-action: none; }
.hp-hoja { display: block; width: 100%; height: auto; pointer-events: none; }
.hp-elemento { position: absolute; cursor: move; outline: 2px dashed transparent; line-height: 1.1; touch-action: none; }
.hp-elemento:hover, .hp-elemento:focus-visible, .hp-elemento.hp-moviendo { outline-color: var(--acento); }
.hp-elemento-imagen img { display: block; width: 100%; height: auto; pointer-events: none; }
.hp-elemento-texto span { display: block; white-space: nowrap; color: #111; pointer-events: none; }
.hp-agarre { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--acento); border: 2px solid #fff; cursor: nwse-resize; touch-action: none; }
.herramientas-pdf .hp-quitar-elem { position: absolute; top: -12px; right: -12px; min-height: 22px; min-width: 22px; width: 22px; height: 22px; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; color: #a33a2a; }
.hp-aviso-firma { padding: 8px 12px; border-left: 3px solid var(--cobre); background: #fff7ee; border-radius: 4px; }

/* Censurar */
.hp-escenario-dibujo { cursor: crosshair; }
.hp-caja { position: absolute; background: #000; outline: 2px solid var(--acento); }
.hp-caja-guia { background: rgb(0 0 0 / .45); pointer-events: none; }
.hp-checks-fila { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.hp-checks-fila label { display: inline-flex; align-items: center; gap: 6px; }

/* Comparar */
.hp-etiqueta { font: 700 11px "Fira Mono", monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--acento); font-style: normal; }
.hp-comparacion { display: grid; gap: 10px; }
.hp-cifra-mas dt { color: #0a6b2c; font-weight: 700; }
.hp-cifra-menos dt { color: #a3261b; font-weight: 700; }
.hp-diff { max-height: 360px; overflow: auto; padding: 12px; border: 1px solid #c8d1dd; border-radius: 8px; background: #fff; font-size: 14px; line-height: 1.7; }
.hp-mas { color: #0a6b2c; background: #e5f6ea; text-decoration: none; }
.hp-menos { color: #a3261b; background: #fdeeea; text-decoration: line-through; }
.hp-igual { color: #3d4a5c; }
.hp-visual { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hp-visual-pag { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; }
.hp-visual-pag img { width: 100%; height: auto; border: 1px solid #e2e6ed; }
.hp-visual-extra { display: grid; place-items: center; min-height: 120px; color: var(--suave); font-size: 13px; text-align: center; background: var(--perla, #f2f5f8); border-radius: 6px; }

/* Editar */
.hp-edit-escenario[data-herramienta="mover"] { cursor: default; }
.hp-capa { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.hp-capa .hp-el { vector-effect: non-scaling-stroke; }
.hp-sel-caja { position: absolute; pointer-events: none; outline: 2px dashed var(--acento); outline-offset: 2px; }
.herramientas-pdf .hp-sel-quitar { transform: translate(40%, -60%); }
.hp-sel-agarre { position: absolute; transform: translate(-50%, -50%); right: auto; bottom: auto; }
.hp-barra-edicion { gap: 12px; }
.hp-herramientas { display: flex; flex-wrap: wrap; gap: 6px; }
.herramientas-pdf .hp-herr { min-height: 36px; padding: 6px 12px; }
.herramientas-pdf .hp-herr[aria-pressed="true"] { color: #fff; background: var(--acento); border-color: transparent; }
.hp-opciones-edicion { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hp-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.hp-tam { width: 64px; min-height: 36px; padding: 4px 8px; border: 1px solid #c8d1dd; border-radius: 8px; font: inherit; }
.hp-fuente-sel, .hp-grosor-sel { min-height: 36px; padding: 4px 8px; border: 1px solid #c8d1dd; border-radius: 8px; font: inherit; background: #fff; }

/* Pantallas medianas y móviles: el panel de opciones pasa debajo y su botón queda siempre a la mano */
@media (max-width: 900px) {
  .hp-taller { grid-template-columns: 1fr; }
  .hp-lateral { position: static; max-height: none; overflow: visible; }
  .hp-lateral .hp-pie { position: sticky; bottom: 0; margin-bottom: -18px; }
}
/* Sin ratón (móvil y tableta): las flechas van bajo el nombre, siempre visibles, para no tapar la miniatura */
@media (hover: none), (max-width: 900px) {
  .hp-mover { position: static; transform: none; opacity: 1; justify-content: center; }
}
/* Laptop (pantallas bajas): tarjetas y panel un poco más compactos */
@media (max-height: 800px) and (min-width: 901px) {
  .hp-mini-archivo { height: 130px; }
  .hp-mini-archivo img { max-height: 130px; }
  .hp-lateral { top: 84px; max-height: calc(100vh - 96px); }
  .hp-rango-hoja { width: 92px; height: 118px; }
}
@media (prefers-reduced-motion: reduce) { .hp-mover, .herramientas-pdf .hp-flotante { transition: none; } }

/* Editar PDF: la barra de opciones en una sola fila que se ajusta, con controles de tamaño natural */
.hp-opciones-edicion { align-items: center; }
.hp-opciones-edicion .hp-mini { flex: 0 0 auto; }
.hp-opciones-edicion .hp-mini input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }
.hp-opciones-edicion .hp-fuente-sel, .hp-opciones-edicion .hp-grosor-sel { width: auto; min-width: 96px; }
.hp-opciones-edicion .hp-texto-extra { flex: 1 1 200px; width: auto; min-width: 160px; }
.hp-opciones-edicion .hp-tam { width: 64px; }
.hp-opciones-edicion .hp-colores { flex: 0 0 auto; }
.hp-mini { display: inline-flex; align-items: center; gap: 6px; }

/* Rellenar formulario: la página con sus campos escritos encima */
.hp-rellenar { display: grid; gap: 14px; justify-items: center; min-width: 0; }
.hp-rellenar > .hp-ayuda { justify-self: stretch; margin: 0; text-align: center; }
.hp-form-pag { margin: 0; width: 100%; max-width: 760px; }
.hp-form-pag figcaption { margin-top: 6px; text-align: center; color: var(--suave); font-size: 12px; }
.hp-form-hoja { position: relative; width: 100%; background: #fff; box-shadow: 0 2px 14px rgb(15 23 41 / .22); }
.hp-form-hoja > img { display: block; width: 100%; height: auto; user-select: none; }
.hp-form-hoja > .hp-cargando { position: absolute; inset: 0; display: grid; place-items: center; color: var(--suave); }
.hp-f-celda { position: absolute; display: flex; }
.hp-rellenar .hp-f-celda input, .hp-rellenar .hp-f-celda textarea, .hp-rellenar .hp-f-celda select { width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0 3px; box-sizing: border-box; border: 1px solid rgb(11 99 181 / .5); border-radius: 2px; background: rgb(226 240 255 / .78); color: #0b1422; font: 500 calc(var(--k, 1) * var(--alto, 10) * 1px) / 1.15 "Fira Sans", sans-serif; }
.hp-rellenar .hp-f-celda textarea { padding: 2px 3px; resize: none; line-height: 1.2; }
.hp-rellenar .hp-f-celda input[type="checkbox"], .hp-rellenar .hp-f-celda input[type="radio"] { padding: 0; accent-color: var(--acento); cursor: pointer; }
.hp-rellenar .hp-f-celda input:focus, .hp-rellenar .hp-f-celda textarea:focus, .hp-rellenar .hp-f-celda select:focus { outline: 2px solid var(--acento); outline-offset: 0; background: rgb(255 255 255 / .96); }
.hp-form-lista { justify-self: stretch; display: grid; gap: 10px; max-width: 760px; width: 100%; margin: 0 auto; }
.hp-form-lista .hp-campo { display: grid; gap: 4px; }
.hp-f-etq { font-weight: 600; font-size: 13px; }
.hp-f-opciones { display: flex; gap: 14px; flex-wrap: wrap; }
.hp-rellenar .hp-sin-campos { justify-self: stretch; text-align: center; max-width: none; padding: 26px 12px; border: 1px dashed #b8c4d4; border-radius: 12px; }

/* HTML a PDF: caja para pegar el código */
.hp-pegar-caja { display: grid; gap: 8px; width: 100%; max-width: 560px; margin-top: 14px; text-align: left; }
.hp-pegar-caja label { display: grid; gap: 6px; margin: 0; max-width: none; }
.hp-pegar { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 8px; font: 13px / 1.4 "Fira Mono", monospace; background: #fff; resize: vertical; }
.hp-pegar-caja .hp-boton { justify-self: start; }

/* Escanear a PDF: botón de cámara */
.hp-camara { margin-top: 4px; }
.herramientas-pdf .hp-camara-flotante { font-size: 18px; }

/* Aviso al terminar con un puente hacia PymesPros */
.hp-puente { display: grid; gap: 6px; justify-items: start; margin: 12px 0; padding: 14px 16px; border: 1px solid var(--borde); border-left: 4px solid var(--acento); border-radius: 10px; background: rgb(11 99 181 / .05); }
.hp-puente p { margin: 0; max-width: 70ch; font-size: 14px; color: var(--suave); }
.herramientas-pdf .hp-puente .hp-boton { text-decoration: none; }
