@font-face { font-family: Geist; src: url(/fuentes/geist-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(/fuentes/geist-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/fuentes/instrument-serif-latin-400-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --fondo: #F7F6F4; --tarjeta: #FFFFFF; --suave: #EEEDEA; --texto: #101114; --apoyo: #5D6068;
  --linea: rgba(16, 17, 20, .1); --acento: #FF5B2E; --error: #B3261E; --bien: #1E7A45;
  --r: 28px; --r-chico: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 400 16px/1.5 Geist, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; padding: 16px 20px 12px; }
.logo { height: 20px; width: auto; display: block; }
.guardado { font-size: 13px; color: var(--apoyo); }
.progreso { position: sticky; top: 0; z-index: 5; height: 3px; background: var(--suave); }
.progreso-barra { height: 100%; width: 0; background: var(--texto); transition: width .35s cubic-bezier(.2, .7, .2, 1); }

.app { max-width: 640px; margin: 0 auto; padding: 20px 20px 24px; outline: none; }
.paso-num { font: italic 400 20px/1 'Instrument Serif', Georgia, serif; color: var(--acento); margin: 8px 0 6px; }
h1 { font-weight: 500; font-size: 34px; line-height: 1.04; letter-spacing: -.04em; margin: 0 0 12px; }
h1 em { font: italic 400 1.14em/1 'Instrument Serif', Georgia, serif; color: var(--acento); letter-spacing: -.01em; }
h2 { font-weight: 500; font-size: 22px; letter-spacing: -.03em; margin: 0 0 4px; }
.intro { color: var(--apoyo); font-size: 17px; margin: 0 0 24px; }
.ayuda { color: var(--apoyo); font-size: 14.5px; margin: 2px 0 10px; }
.ayuda b, .intro b { color: var(--texto); font-weight: 500; }

.tarjeta { background: var(--tarjeta); border-radius: var(--r); padding: 22px 20px; margin: 0 0 14px; }
.campo { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.campo:last-child { margin-bottom: 0; }
.etiqueta, legend.etiqueta { display: block; font-weight: 500; font-size: 17px; letter-spacing: -.01em; margin: 0 0 2px; padding: 0; }
.opcional { color: var(--apoyo); font-weight: 400; font-size: 14px; }

input[type=text], input[type=email], input[type=date], textarea {
  width: 100%; border: 1px solid var(--linea); background: var(--fondo); border-radius: var(--r-chico);
  padding: 13px 14px; font-size: 16px; line-height: 1.45; outline: none; transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
input[type=date] { min-height: 50px; }
textarea { min-height: 112px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--texto); background: #fff; }
.campo.mal input, .campo.mal textarea { border-color: var(--error); }
.error { color: var(--error); font-size: 14px; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }

.opciones { display: grid; gap: 8px; }
.opcion { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border: 1px solid var(--linea); border-radius: var(--r-chico); background: var(--fondo); cursor: pointer; transition: border-color .15s, background .15s; }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion .marca { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--apoyo); display: grid; place-items: center; }
.opcion.check .marca { border-radius: 6px; }
.opcion input:checked + .marca { background: var(--texto); border-color: var(--texto); }
.opcion input:checked + .marca::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opcion.check input:checked + .marca::after { width: 10px; height: 6px; border-radius: 0; background: none; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.opcion:has(input:checked) { border-color: var(--texto); background: #fff; }
.opcion input:focus-visible + .marca { outline: 2px solid var(--texto); outline-offset: 3px; }
.opcion.deshabilitada { opacity: .45; cursor: not-allowed; }
.opcion small { display: block; color: var(--apoyo); font-size: 13.5px; }
.fila-numeros { grid-template-columns: repeat(5, 1fr); }
.fila-numeros .opcion { justify-content: center; padding: 12px 0; }
.fila-numeros .opcion .marca { display: none; }
.fila-numeros .opcion span:last-child { font-weight: 500; font-size: 18px; }

.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--texto); color: var(--fondo); font-weight: 500; font-size: 16px; cursor: pointer; transition: transform .12s, opacity .15s; -webkit-tap-highlight-color: transparent; }
.boton:active { transform: scale(.97); }
.boton:focus-visible { outline: 2px solid var(--texto); outline-offset: 3px; }
.boton.secundario { background: var(--suave); color: var(--texto); }
.boton.chico { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.boton[disabled] { opacity: .45; cursor: default; }
.enlace { background: none; border: 0; padding: 6px 0; color: var(--texto); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14.5px; }

.navegacion { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 10px; justify-content: space-between; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: rgba(247, 246, 244, .96); border-top: 1px solid var(--linea); }
.navegacion .boton { flex: 1; max-width: 300px; }
.navegacion #siguiente { flex: 2; }
@media (min-width: 680px) { .navegacion { justify-content: center; } }
.aviso-subidas { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 11; background: var(--texto); color: var(--fondo); padding: 8px 16px; border-radius: 999px; font-size: 14px; white-space: nowrap; }

/* ---- grabadora ---- */
.voz { margin-top: 10px; }
.voz-boton { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 1px dashed rgba(16, 17, 20, .28); background: transparent; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.voz-boton:active { transform: scale(.98); }
.voz-micro { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--texto); color: var(--fondo); display: grid; place-items: center; }
.voz-micro svg { width: 20px; height: 20px; }
.voz-boton b { font-weight: 500; display: block; font-size: 15.5px; }
.voz-boton small { color: var(--apoyo); font-size: 13px; display: block; }
.voz-grabando { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--texto); color: var(--fondo); min-height: 56px; }
.voz-punto { width: 10px; height: 10px; border-radius: 50%; background: var(--acento); animation: latido 1s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .25; } }
.voz-tiempo { font-variant-numeric: tabular-nums; font-weight: 500; }
.voz-onda { flex: 1; height: 24px; display: flex; align-items: center; gap: 3px; overflow: hidden; }
.voz-onda i { flex: none; width: 3px; border-radius: 2px; background: rgba(247, 246, 244, .7); height: 4px; transition: height .08s; }
.voz-parar { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--fondo); color: var(--texto); font-weight: 500; cursor: pointer; }
.notas { display: grid; gap: 8px; margin-bottom: 8px; }
.notas:empty { display: none; }
.nota { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; min-width: 0; border-radius: var(--r-chico); background: var(--fondo); border: 1px solid var(--linea); }
.nota audio { flex: 1 1 100%; width: 100%; min-width: 0; height: 40px; }
.nota .estado { flex: 1; }
.nota .estado, .foto .estado { font-size: 12.5px; color: var(--apoyo); white-space: nowrap; }
.nota .estado.ok, .foto .estado.ok { color: var(--bien); }
.nota .estado.mal, .foto .estado.mal { color: var(--error); }
.quitar { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--apoyo); }
.quitar svg { width: 18px; height: 18px; }
.voz-subir { margin-top: 6px; font-size: 13.5px; color: var(--apoyo); }
.voz-subir label { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--texto); }
.voz-subir input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ---- fotos ---- */
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.foto { position: relative; aspect-ratio: 1; border-radius: var(--r-chico); overflow: hidden; background: var(--suave); display: flex; align-items: flex-end; }
.foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foto .pie { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px 8px; background: rgba(255, 255, 255, .92); }
.foto .sin-vista { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 12.5px; color: var(--apoyo); }
.foto .quitar { width: 30px; height: 30px; }
.foto-anadir { aspect-ratio: 1; border-radius: var(--r-chico); border: 1px dashed rgba(16, 17, 20, .28); display: grid; place-items: center; text-align: center; cursor: pointer; font-size: 14px; color: var(--texto); padding: 8px; position: relative; }
.foto-anadir input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.foto-anadir span { font-size: 28px; line-height: 1; display: block; font-weight: 400; }
.foto-anadir:focus-within { outline: 2px solid var(--texto); outline-offset: 3px; }

/* ---- recuerdos ---- */
.recuerdo-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.recuerdo-cab .num { font: italic 400 22px/1 'Instrument Serif', Georgia, serif; color: var(--acento); }
.bloque-aviso { border-radius: var(--r-chico); background: var(--suave); padding: 12px 14px; font-size: 14.5px; margin: 10px 0 0; }
.bloque-aviso.fuerte { background: #FFF1EC; }
.resumen-pago { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--suave); font-size: 13.5px; }
.legal a { color: var(--texto); }
.gracias { text-align: left; padding-top: 24px; }
.gracias h1 { font-size: 40px; }
.recuperar { background: var(--tarjeta); border-radius: var(--r); padding: 16px 18px; margin: 0 0 16px; font-size: 14.5px; }
.recuperar p { margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.nota-sin { flex: 1; font-size: 14px; }
.reintentar-foto { position: absolute; top: 8px; left: 8px; right: 8px; padding-left: 4px; padding-right: 4px; font-size: 13px; }
.sub-campos { margin-top: 16px; }
.ancho { width: 100%; }
.separada { margin-top: 8px; }
