body {
  font-family: 'Inter', Arial, sans-serif;
  background-color: #99D5FF;
  background-image: radial-gradient(rgba(80, 80, 80, 0.2) 1px, transparent 1px);
  background-size: 6px 6px;
  color: #0A0A0A;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: auto;
  background: #fafafa;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #cccccc;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.10),
    0 8px 20px rgba(0, 0, 0, 0.07);
}

h2, h3 {
  text-align: center;
  color: #0A0A0A;
  font-weight: 700;
}

h4 {
  text-align: center;
  color: #0A0A0A;
  font-weight: 400;
  margin-bottom: 10px;
}

label {
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}

.instrucciones {
  font-style: italic;
  font-size: 0.9em;
  color: #0A0A0A;
  margin-bottom: 20px;
  white-space: pre-line;
}

input, select, button, canvas, textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid #cccccc;
  box-sizing: border-box;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1em;
}

input, select {
  background: #ffffff;
  color: #0A0A0A;
}

input:focus, select:focus {
  outline: 2px solid rgba(70, 91, 145, 0.35);
  outline-offset: 1px;
  border-color: #8a9bc4;
}

input::placeholder {
  color: #888888;
}

canvas {
  padding: 0;
}

button {
  background: linear-gradient(145deg, #e9efff, #d6e0f8);
  color: #0A0A0A;
  cursor: pointer;
  font-weight: 700;
  border: 1px solid rgba(70, 91, 145, 0.30);
  border-radius: 9px;
  font-size: 16px;
  padding: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  background: linear-gradient(145deg, #dce6ff, #c5d5f5);
  color: #0A0A0A;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

hr {
  border: none;
  border-top: 1px solid #cccccc;
  margin: 20px 0;
}

/* Ocultar bloques por defecto */
.oculto {
  display: none;
}

#spinner {
  display: none;
  margin-top: 20px;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #ccc;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.aviso-datos {
  font-size: 0.9em;
  margin-top: 15px;
  background: #fff3e8;
  padding: 12px;
  border-left: 4px solid #ff8c42;
  border-radius: 7px;
}

.aviso-datos a {
  color: #b74700;
  font-weight: 600;
  text-decoration: none;
}

.aviso-datos a:hover {
  text-decoration: underline;
}

.aviso-dni {
  font-size: 0.9em;
  margin-top: 15px;
  background: #CCFFDE;
  padding: 12px;
  border-left: 4px solid #27F568;
  border-radius: 7px;
}

.notas-pie {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #cccccc;
  font-size: 0.9em;
  color: #555555;
  line-height: 1.5;
}

.notas-pie sup {
  font-weight: bold;
}

#nota1 {
  scroll-margin-top: 20px;
}

sup a {
  text-decoration: none;
}

sup a:hover {
  text-decoration: underline;
}

.consentimiento-salud {
  display: none;
  margin-top: 14px;
  padding: 16px;
  border: 2px solid #d89b00;
  border-radius: 8px;
  background: #fff8e5;
}

.consentimiento-salud label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

.consentimiento-salud input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 1px 0 0;
  accent-color: #9a6800;
  cursor: pointer;
}

#opcionesSalud {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #cccccc;
  border-radius: 7px;
}

#opcionesSalud legend {
  padding: 0 5px;
  font-weight: 700;
}

#opcionesSalud label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  font-weight: 400;
  cursor: pointer;
}

#opcionesSalud input[type="radio"] {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 0;
  padding: 0;
  accent-color: #b74700;
  cursor: pointer;
}

@media (max-width: 600px) {
  body {
    padding: 0;
  }

  .container {
    width: 100%;
    max-width: none;
    padding: 12px;
    box-sizing: border-box;
  }

  input[type="date"],
  input[type="time"],
  input[type="datetime-local"] {
    display: block;
    width: 100%;
    padding: 8px 2px;
    font-size: 16px;
  }

  #opcionesSalud {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }

  #opcionesSalud legend {
    grid-column: 1 / -1;
  }

  #opcionesSalud label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    margin: 0;
    padding: 10px;
    border: 1px solid #8a9bc4;
    border-radius: 9px;
    background: #ffffff;
    font-weight: 700;
    box-sizing: border-box;
  }

  #opcionesSalud input[type="radio"] {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin: 0;
    padding: 0;
    accent-color: #465b91;
  }

  #opcionesSalud label:has(input:checked) {
    background: #e9efff;
    border-color: #465b91;
    box-shadow: 0 0 0 2px rgba(70, 91, 145, 0.18);
  }
}
