:root {
  --fondo: #f6f5f1; --texto: #1d1d1b; --suave: #6b6b66; --borde: #d9d7cf;
  --marca: #1f3a2e; --marca-txt: #ffffff; --ok: #1e7a3c; --error: #b3261e; --aviso: #fff4d6;
}
@media (prefers-color-scheme: dark) {
  :root { --fondo: #151513; --texto: #ecebe6; --suave: #a3a29c; --borde: #34332f;
          --marca: #3d7a5c; --ok: #5cc27e; --error: #ff8a80; --aviso: #3a3220; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fondo); color: var(--texto);
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--marca); color: var(--marca-txt); font-weight: 600; }
section { padding: 16px; max-width: 520px; margin: 0 auto; }
h1 { font-size: 1.4rem; margin: 8px 0 16px; }
h2 { font-size: 1rem; color: var(--suave); margin: 24px 0 8px; }
label { display: block; margin-bottom: 14px; }
input[type=email], input[type=password], input[type=text] {
  display: block; width: 100%; margin-top: 6px; padding: 12px; font-size: 1.1rem;
  border: 1px solid var(--borde); border-radius: 8px; background: transparent; color: inherit; }
button, .principal { display: block; width: 100%; padding: 14px; margin: 10px 0;
  font-size: 1.05rem; border-radius: 10px; border: 1px solid var(--borde);
  background: transparent; color: inherit; text-align: center; cursor: pointer; }
.principal { background: var(--marca); color: var(--marca-txt); border-color: var(--marca); font-weight: 600; }
.grande { padding: 28px 14px; font-size: 1.25rem; }
.enlace { width: auto; border: 0; padding: 6px; margin: 0; background: none; color: inherit; text-decoration: underline; }
header .enlace { color: var(--marca-txt); }
.saludo { margin: 4px 0 12px; }
.error { color: var(--error); }
.ok { color: var(--ok); font-size: 1.4rem; text-align: center; margin: 12px 0; }
.aviso { display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--aviso); padding: 10px 12px; border-radius: 8px; margin-top: 12px; }
.aviso button { width: auto; margin: 0; padding: 8px 12px; }
.lista { list-style: none; padding: 0; margin: 0; }
.lista li { display: flex; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--borde); }
.lista li small { color: var(--suave); }
.lista li button { width: auto; margin: 0; padding: 4px 10px; font-size: .9rem; }
#cFoto { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 8px; background: #000; }
.estado { text-align: center; color: var(--suave); min-height: 1.4em; padding: 0 16px 24px; }
/* input de fichero oculto pero activable desde su label (iOS no siempre abre uno con display:none) */
.oculto { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
