/* Música y lectura: estilos compartidos (participante y panel). */

:root {
  --papel: #f2f4f6;
  --superficie: #ffffff;
  --tinta: #1c2733;
  --tinta-suave: #55636f;
  --linea: #d3dae0;
  --acento: #2b5c8a;
  --acento-fondo: #e3ecf4;
  --error: #9e3a35;
  --error-fondo: #f6e6e4;
  --ok: #2f6b4e;
  --ok-fondo: #e2efe8;
  --aviso: #7d5f17;
  --aviso-fondo: #f5eed9;

  --fuente: "Atkinson Hyperlegible", system-ui, sans-serif;
  --radio: 6px;
  --foco: 0 0 0 3px rgba(43, 92, 138, 0.35);
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--fuente);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--acento); }

:focus-visible { outline: none; box-shadow: var(--foco); border-radius: var(--radio); }

/* Botones */
.boton {
  font: inherit;
  font-weight: 700;
  border: 2px solid var(--acento);
  background: var(--acento);
  color: #fff;
  padding: 0.6em 1.3em;
  border-radius: var(--radio);
  cursor: pointer;
}
.boton:hover { filter: brightness(1.08); }
.boton:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.boton.secundario { background: transparent; color: var(--acento); }
.boton.peligro { background: var(--error); border-color: var(--error); }
.boton.peligro.secundario { background: transparent; color: var(--error); }
.boton.chico { padding: 0.35em 0.8em; font-size: 0.88rem; }

.acciones { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* Formularios */
.campo { margin: 0 0 1.2rem; }
.campo > label, .campo > legend { display: block; font-weight: 700; margin-bottom: 0.35rem; }
fieldset.campo { border: 0; padding: 0; }
.opciones { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.opciones label { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; cursor: pointer; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
  font: inherit;
  padding: 0.5em 0.7em;
  border: 1.5px solid var(--linea);
  border-radius: var(--radio);
  background: var(--superficie);
  color: var(--tinta);
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--acento); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--acento); width: 1.05rem; height: 1.05rem; }

/* Mensajes */
.nota { color: var(--tinta-suave); font-size: 0.92rem; }
.mensaje { padding: 0.8rem 1rem; border-radius: var(--radio); margin: 1rem 0; border-left: 4px solid; }
.mensaje.error { background: var(--error-fondo); border-color: var(--error); }
.mensaje.ok { background: var(--ok-fondo); border-color: var(--ok); }
.mensaje.aviso { background: var(--aviso-fondo); border-color: var(--aviso); }
.mensaje.info { background: var(--acento-fondo); border-color: var(--acento); }

.tecla {
  display: inline-block;
  min-width: 2em;
  padding: 0.05em 0.5em;
  border: 1.5px solid var(--tinta-suave);
  border-bottom-width: 3px;
  border-radius: 5px;
  font-weight: 700;
  text-align: center;
  background: var(--superficie);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
