:root {
  /* Colores de marca Raúl Castillo (mismos que la web e Instagram) */
  --navy: #121315;
  --navy-2: #2a2c30;
  --azul: #121315;
  --amarillo: #ffcc00;
  --amarillo-2: #f2c200;
  --verde: #2e7d32;
  --lima: #ffcc00;
  --naranja: #f39200;
  --rojo: #b3261e;
  --fondo: #f5f5f2;
  --tarjeta: #ffffff;
  --texto: #121315;
  --suave: #4b5058;
  --borde: #dcdcd6;
  --sel: #fff6cc;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(18, 19, 21, .06), 0 6px 20px rgba(18, 19, 21, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.45 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--azul); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.hero :focus-visible { outline-color: var(--amarillo); }
.oculto { display: none !important; }

/* ---------- cabecera */
.cab {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
}
.cab-in { max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.cab img { height: 40px; width: auto; }
.cab .tit { font-weight: 800; color: var(--navy); font-size: 15px; line-height: 1.15; }
.cab .tit small { display: block; font-weight: 600; color: var(--suave); font-size: 12px; }
.cab .esp { flex: 1; }
.btn-icono {
  border: 1px solid var(--borde); background: #fff; border-radius: 10px; height: 44px; min-width: 44px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--navy); font-weight: 700; font-size: 13px;
}
.btn-icono svg { width: 18px; height: 18px; }
.progreso { max-width: 600px; margin: 8px auto 0; height: 5px; background: #e4e4de; border-radius: 9px; overflow: hidden; }
.progreso i { display: block; height: 100%; width: 0; background: var(--amarillo); transition: width .35s ease; }

/* ---------- contenedor */
main { max-width: 600px; margin: 0 auto; padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); }
.seccion { color: var(--suave); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 4px 0 6px; }
h1 { font-size: 27px; line-height: 1.15; margin: 6px 0 10px; color: var(--navy); letter-spacing: -.01em; }
h2 { font-size: 22px; line-height: 1.2; margin: 0 0 8px; color: var(--navy); letter-spacing: -.01em; }
p.sub { color: var(--suave); margin: 0 0 18px; }
.ayuda {
  display: flex; gap: 10px; align-items: flex-start; background: #fffbe6; border: 1px solid #f1e3a0; color: #3a3420;
  border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0 0 16px;
}
.ayuda svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #8a6d00; }
.card { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px; }

/* ---------- inicio */
.hero { background: linear-gradient(150deg, #121315 0%, #1e2024 60%, #2a2c30 100%); color: #fff; border-radius: 20px; padding: 24px 20px; position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: 29px; }
.hero p { color: #e4e4de; margin: 0 0 18px; }
.hero::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 204, 0, .35), transparent 70%); }
.ventajas { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.ventajas li { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 15px; }
.ventajas svg { width: 20px; height: 20px; color: var(--lima); flex: none; }
.instalar-card { margin-top: 16px; display: flex; gap: 14px; align-items: center; }
.instalar-card img { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--borde); }
.instalar-card b { color: var(--navy); }
.instalar-card p { margin: 2px 0 0; color: var(--suave); font-size: 14px; }
.instalar-card .btn { margin-left: auto; }
.pie-contacto { text-align: center; color: var(--suave); font-size: 14px; margin-top: 22px; }

/* ---------- botones */
.btn {
  appearance: none; border: 0; border-radius: 12px; padding: 14px 18px; font-weight: 800; cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .08s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn-pri { background: var(--amarillo); color: #121315; box-shadow: 0 4px 14px rgba(255, 204, 0, .35); }
.btn-pri:hover { background: var(--amarillo-2); }
.btn-pri[disabled] { background: #e4dfc4; color: #6b6b64; box-shadow: none; cursor: not-allowed; }
.btn-sec { background: #fff; color: var(--navy); border: 1px solid var(--borde); }
.btn-wa { background: #15803d; color: #fff; }
.btn-bl { width: 100%; }
.btn-peq { padding: 9px 12px; font-size: 14px; border-radius: 10px; }
.btn svg { width: 20px; height: 20px; }

/* barra inferior */
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--borde); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.barra-in { max-width: 600px; margin: 0 auto; display: flex; gap: 10px; }
.barra .btn-sec { flex: 0 0 auto; }
.barra .btn-pri { flex: 1; }

/* ---------- opciones */
.opciones { display: grid; gap: 10px; }
.opcion {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--borde);
  border-radius: 13px; padding: 14px 14px; cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s; min-height: 56px;
}
.opcion:hover { border-color: #b9b9b1; }
.opcion .marca { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #8f8f88; display: grid; place-items: center; transition: all .15s; }
.opcion.multi .marca { border-radius: 6px; }
.opcion.sel { border-color: #121315; background: var(--sel); }
.opcion.sel .marca { border-color: #121315; background: #121315; }
.opcion.sel .marca::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }

.trabajos { display: grid; gap: 10px; }
.trabajo { align-items: flex-start; padding: 14px; }
.trabajo .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #f0f0eb; display: grid; place-items: center; color: var(--navy); }
.trabajo .ico svg { width: 24px; height: 24px; }
.trabajo.sel .ico { background: var(--amarillo); color: #121315; }
.trabajo .txt { flex: 1; }
.trabajo .txt b { display: block; color: var(--navy); font-size: 16px; }
.trabajo .txt span { display: block; color: var(--suave); font-weight: 500; font-size: 14px; }
.trabajo .marca { margin-top: 10px; }

/* número */
.numero { display: flex; align-items: center; gap: 10px; }
.numero input {
  width: 100%; font-size: 30px; font-weight: 800; color: var(--navy); padding: 14px 16px; border-radius: 13px; border: 1.5px solid var(--borde); background: #fff;
}
.numero input:focus, .campo input:focus, .campo textarea:focus, .campo select:focus { outline: 3px solid rgba(255, 204, 0, .55); border-color: var(--navy); }
.numero .unidad { font-weight: 700; color: var(--suave); }
.nose { margin-top: 12px; }

/* contadores */
.contadores { display: grid; gap: 8px; }
.contador { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--borde); border-radius: 13px; padding: 10px 10px 10px 14px; }
.contador.activo { border-color: #121315; background: var(--sel); }
.contador span { flex: 1; font-weight: 600; }
.contador button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--borde); background: #fff; font-size: 22px; font-weight: 700; color: var(--navy); cursor: pointer; line-height: 1; }
.contador input { width: 56px; text-align: center; font-weight: 800; font-size: 18px; border: 0; background: transparent; color: var(--navy); }

/* campos */
.campo { display: block; margin-bottom: 14px; }
.campo > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.campo > span em { font-style: normal; color: var(--rojo); }
.campo input, .campo textarea, .campo select { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--borde); background: #fff; font-size: 16px; }
.campo textarea { min-height: 120px; resize: vertical; }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--suave); cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: #121315; flex: none; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--borde); background: #fff; border-radius: 999px; padding: 8px 14px; min-height: 44px; font-weight: 700; cursor: pointer; font-size: 14px; }
.chip.sel { border-color: #121315; background: var(--amarillo); color: #121315; }

/* fotos */
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.foto { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #ecece8; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto button { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; font-size: 16px; }
.add-foto { aspect-ratio: 1; border-radius: 12px; border: 2px dashed #b9b9b1; background: #fff; display: grid; place-items: center; text-align: center; cursor: pointer; color: var(--azul); font-weight: 700; font-size: 13px; padding: 6px; }
.add-foto svg { width: 28px; height: 28px; display: block; margin: 0 auto 4px; }

.error { color: var(--rojo); font-weight: 700; font-size: 14px; margin-top: 10px; }

/* resumen */
.resumen { display: grid; gap: 12px; }
.resumen .bloque h3 { margin: 0 0 6px; font-size: 15px; color: var(--navy); display: flex; justify-content: space-between; align-items: center; }
.resumen dl { margin: 0; display: grid; gap: 6px; }
.resumen dt { color: var(--suave); font-size: 13px; }
.resumen dd { margin: 0 0 4px; font-weight: 600; }
.enlace { background: none; border: 0; color: var(--azul); font-weight: 700; cursor: pointer; padding: 0; font-size: 14px; }

/* gracias */
.ok-ico { width: 74px; height: 74px; border-radius: 50%; background: var(--amarillo); color: #121315; display: grid; place-items: center; margin: 20px auto 14px; }
.ok-ico svg { width: 40px; height: 40px; }
.centro { text-align: center; }
.ref { display: inline-block; background: #f0f0eb; color: var(--navy); font-weight: 800; padding: 6px 12px; border-radius: 9px; letter-spacing: .03em; }

/* modal instalar */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(18, 19, 21, .6); display: flex; align-items: flex-end; justify-content: center; }
.modal-in { background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; animation: sube .25s ease; }
@media (min-width: 700px) { .modal { align-items: center; } .modal-in { border-radius: 20px; } }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.tabs { display: flex; gap: 6px; background: #ecece8; padding: 4px; border-radius: 12px; margin: 10px 0 16px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 9px; font-weight: 800; cursor: pointer; color: var(--suave); }
.tabs button.sel { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: p; }
.pasos li { display: flex; gap: 12px; align-items: flex-start; counter-increment: p; }
.pasos li::before { content: counter(p); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.kbd { display: inline-flex; align-items: center; gap: 4px; background: #f0f0eb; border: 1px solid #dcdcd6; border-radius: 7px; padding: 1px 7px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.kbd svg { width: 16px; height: 16px; }
.nota { font-size: 13px; color: var(--suave); margin-top: 14px; }

.cargando { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(18, 19, 21, .25); border-top-color: #121315; border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.aparece { animation: aparece .25s ease; }
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Pie con firma de marca */
.lema { text-align: center; color: var(--suave); font-size: 13px; font-style: italic; margin: 10px 0 0; }
.oculto-visual { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
