/* Pantallas en Paz · GUK Digital */

/* Letras guardadas dentro de la app: se ven igual con o sin internet. */
@font-face {
  font-family: "Quicksand";
  src: url("../letras/quicksand.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../letras/playfair-display-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --fondo: #FBF8F4;
  --texto: #1F1F1F;
  --texto-suave: #4A4A4A;
  --verde: #2F5B48;
  --verde-claro: #E4EFE8;
  --naranja: #B3541E;
  --dorado: #D9B46A;
  --dorado-fondo: #FBEFD6;
  --lavanda: #B7A6D6;
  --lavanda-fondo: #ECE6F7;
  --rosa: #E8A9A2;
  --rosa-fondo: #FBE7E4;
  --sos: #E5484D;
  --radio: 18px;
  --sombra: 0 3px 12px rgba(47, 91, 72, 0.12);
  --ancho-boton: 320px;
  --alto-barra-sos: 88px;
  --fuente-titulo: "Playfair Display", Georgia, "Times New Roman", serif;
  --fuente-texto: "Quicksand", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente-texto);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

/* Contenedor central: máximo 480 px, 16 px a cada lado, centrado en computador */
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 16px calc(var(--alto-barra-sos) + 24px + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
}
body.en-sos #app { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.pantalla { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.pantalla[hidden] { display: none; }

/* ---------- Títulos (centrados, con línea dorada) ---------- */
.titulo {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.2;
  color: var(--verde);
  text-align: center;
  margin: 28px 0 10px;
  overflow-wrap: break-word;
}
.titulo::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 3px;
  background: var(--dorado);
}
.titulo-app { font-size: 34px; margin-top: 40px; }
.titulo-naranja { color: var(--naranja); }

.marca {
  margin: -6px 0 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--texto-suave);
}

/* ---------- Textos (a la izquierda) ---------- */
.subtitulo { margin: 16px 0 0; font-size: 20px; font-weight: 700; color: var(--verde); }
.texto { margin: 0; font-size: 20px; }
.texto-24 { margin: 0; font-size: 24px; line-height: 1.45; }
.lista-24 { margin: 0; padding-left: 28px; font-size: 24px; line-height: 1.45; }
.lista-24 li + li { margin-top: 8px; }
.pie { margin: 4px 0 0; font-size: 24px; color: var(--texto-suave); }

/* ---------- Tarjetas ---------- */
.tarjeta {
  background: #fff;
  border-radius: var(--radio);
  padding: 18px;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tarjeta-rosa { background: var(--rosa-fondo); }

.etiqueta { font-weight: 700; }
.campo-24 {
  width: 100%;
  min-height: 56px;
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  color: var(--texto);
  padding: 8px 14px;
  border: 2px solid var(--verde);
  border-radius: 12px;
  background: #fff;
}
.campo-24:focus { outline: 3px solid var(--dorado); outline-offset: 2px; }

/* ---------- Botones (centrados, mismo ancho, máx. 320 px) ---------- */
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }

.lista-botones { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.boton-grande, .boton-secundario, .boton-situacion, .boton-edad {
  width: 100%;
  max-width: var(--ancho-boton);
  align-self: center;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}
.boton-grande:active, .boton-secundario:active, .boton-situacion:active, .boton-edad:active { transform: scale(0.98); }

.boton-grande {
  min-height: 64px;
  border: none;
  background: var(--verde);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  padding: 14px 20px;
}
.boton-naranja { background: var(--naranja); }

.boton-quedigo {
  min-height: 120px;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
.boton-icono { font-size: 34px; }

.boton-secundario {
  min-height: 56px;
  border: 2px solid var(--verde);
  background: #fff;
  color: var(--verde);
  font-size: 22px;
  font-weight: 700;
  padding: 10px 20px;
  margin-top: 4px;
}

.boton-situacion {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  border: none;
  background: #fff;
  color: var(--texto);
  font-size: 21px;
  font-weight: 700;
  padding: 12px 16px;
  overflow-wrap: break-word;
}
.boton-situacion.berrinche { background: var(--rosa-fondo); }
.boton-situacion.acompanar { background: var(--lavanda-fondo); }
.boton-situacion .boton-icono { font-size: 30px; flex: 0 0 auto; }

.boton-edad {
  min-height: 96px;
  border: 3px solid transparent;
  background: var(--verde-claro);
  color: var(--verde);
  font-size: 28px;
  font-weight: 700;
}
.boton-edad.ultima { border-color: var(--verde); }

/* ---------- Nota de seguridad ---------- */
.nota-seguridad {
  background: var(--dorado-fondo);
  border-left: 6px solid var(--naranja);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}
.nota-seguridad a { color: var(--naranja); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pantalla de la frase ---------- */
.pantalla-frase { min-height: calc(100dvh - var(--alto-barra-sos) - 40px); }
.frase {
  flex: 1;
  display: flex;
  align-items: center;
  margin: 0;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.3;
  overflow-wrap: break-word;
  padding: 16px 0;
}

/* ---------- Guía SOS ---------- */
.pantalla-sos { min-height: calc(100dvh - 40px); }
.puntos { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.puntos span { width: 12px; height: 12px; border-radius: 50%; background: var(--rosa); opacity: 0.45; }
.puntos span.activo { opacity: 1; background: var(--sos); }
.titulo-sos { font-size: 34px; margin-top: 12px; }
.sos-detalle { margin: 0; font-size: 32px; font-weight: 600; line-height: 1.35; }
.sos-detalle::first-letter { text-transform: uppercase; }

.respira { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0; }
.respira-circulo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--lavanda-fondo) 0%, var(--lavanda) 100%);
  transform: scale(0.55);
  transition-property: transform;
  transition-timing-function: ease-in-out;
}
.respira-texto { margin: 0; font-size: 32px; font-weight: 700; color: var(--verde); text-align: center; white-space: pre-line; }

.enlace-discreto {
  align-self: center;
  text-align: center;
  margin-top: 28px;
  font-size: 28px;
  font-weight: 700;
  color: var(--naranja);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  padding: 10px 16px;
}
.sos-botones { margin-top: auto; }

/* ---------- Barra fija del botón SOS ---------- */
.barra-sos {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--fondo);
  box-shadow: 0 -4px 14px rgba(31, 31, 31, 0.08);
  z-index: 10;
}
body.en-sos .barra-sos { display: none; }
.boton-sos {
  width: 100%;
  max-width: var(--ancho-boton);
  min-height: 64px;
  border: none;
  border-radius: var(--radio);
  background: var(--sos);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(229, 72, 77, 0.35);
}
.boton-sos:active { transform: scale(0.98); }

@media (max-width: 370px) {
  .frase { font-size: 32px; }
  .titulo { font-size: 27px; }
  .titulo-sos { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .boton-grande:active, .boton-secundario:active, .boton-situacion:active,
  .boton-edad:active, .boton-sos:active { transform: none; }
}
