/* Mis memorias — estilos pensados para una persona mayor:
   letra grande, mucho contraste, botones amplios, tono cálido. */

:root {
  --fondo: #fbf6ee;
  --papel: #ffffff;
  --tinta: #2b2320;
  --suave: #6b5d52;
  --calido: #7a3b1d;
  --calido-claro: #a85a30;
  --acento: #2e6b4f;
  --borde: #e3d8c8;
  --sombra: 0 2px 10px rgba(70, 50, 30, 0.10);
  --radio: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px calc(40px + env(safe-area-inset-bottom));
}

.cargando { text-align: center; color: var(--suave); padding: 40px 0; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0.2em 0 0.4em; color: var(--calido); }
h2 { font-size: 1.5rem; margin: 1.2em 0 0.4em; }
h3 { font-size: 1.2rem; margin: 1em 0 0.3em; color: var(--suave); }
p { margin: 0.7em 0; }
a { color: var(--acento); }

.lema { color: var(--suave); font-size: 1.05rem; margin-top: -0.3em; }

/* Botones grandes */
.boton {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: none;
  border-radius: var(--radio);
  padding: 22px 24px;
  margin: 14px 0;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: #fff;
  background: var(--calido);
  box-shadow: var(--sombra);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.boton:active { transform: translatey(1px); }
.boton .emoji { font-size: 1.8rem; line-height: 1; }
.boton.secundario { background: var(--papel); color: var(--tinta); border: 2px solid var(--borde); }
.boton.acento { background: var(--acento); }
.boton.grande { padding: 30px 24px; font-size: 1.5rem; }

button.boton { font-family: inherit; }

/* Menú de secciones */
.menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--papel);
  border: 2px solid var(--borde);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 10px 0;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--tinta);
}
.menu a .flecha { color: var(--calido-claro); }
.menu a.privado { border-style: dashed; }

/* Tarjeta / contenido legible */
.tarjeta {
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 22px 22px;
  box-shadow: var(--sombra);
}
.lectura { font-size: 1.15rem; }
.lectura img { max-width: 100%; border-radius: 12px; }
.lectura blockquote {
  margin: 0.8em 0;
  padding: 0.4em 1em;
  border-left: 4px solid var(--calido-claro);
  background: #f7efe3;
  color: var(--suave);
  border-radius: 0 10px 10px 0;
}
.lectura details {
  margin-top: 1.4em;
  border-top: 1px solid var(--borde);
  padding-top: 0.8em;
  color: var(--suave);
}
.lectura summary { cursor: pointer; font-weight: 600; }
.wikilink-pendiente { color: var(--calido); font-weight: 600; }

/* Barra superior */
.barra {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--acento);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  font-family: inherit;
}

/* Acceso / PIN */
.centro { text-align: center; padding-top: 8vh; }
.campo {
  width: 100%;
  font-size: 1.4rem;
  padding: 18px;
  border: 2px solid var(--borde);
  border-radius: 14px;
  background: var(--papel);
  color: var(--tinta);
  font-family: inherit;
  margin: 12px 0;
}
textarea.campo { min-height: 38vh; line-height: 1.5; }
.pin-input { letter-spacing: 0.5em; text-align: center; }

.aviso { color: #9a2f1d; font-weight: 600; min-height: 1.4em; }
.exito { color: var(--acento); font-weight: 600; }

/* Estado de grabación */
.grabando-señal {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #c0392b;
  margin-right: 10px;
  animation: latido 1.3s infinite;
  vertical-align: middle;
}
@keyframes latido { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.cronometro { font-size: 2.4rem; font-weight: 700; text-align: center; margin: 16px 0; }

.mensaje-grande { font-size: 1.4rem; text-align: center; margin: 24px 0; }
.previsualizacion img { max-width: 100%; border-radius: 14px; margin: 12px 0; }

.nota-pie { color: var(--suave); font-size: 0.95rem; margin-top: 20px; }
.ajustes-link {
  display: inline-block;
  margin: 18px 0 4px;
  color: var(--suave);
  text-decoration: none;
  font-size: 1rem;
}
button.boton:disabled { opacity: 0.6; }
.oculto { display: none !important; }
