:root {
  --fondo: #101418;
  --panel: rgba(16, 20, 24, 0.88);
  --texto: #f5f1e8;
  --acento: #3ddc84;
  --alerta: #ffb020;
  --madera: #c9965a;
  --chip: #5b84b1;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--fondo); color: var(--texto);
  font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
#video { display: none; }
#lienzo { position: fixed; inset: 0; width: 100vw; height: 100vh; }
.oculto { display: none !important; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
.hud-arriba { position: absolute; top: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 16px; }
.hud-abajo { position: absolute; bottom: 14px; left: 16px; right: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.chip { background: var(--chip); color: #fff; font-weight: 700; padding: 8px 16px; border-radius: 12px;
  font-size: 18px; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.reloj { font-size: 30px; font-variant-numeric: tabular-nums; min-width: 160px; text-align: center; }
.boton-chip { pointer-events: auto; border: 0; cursor: pointer; background: #444c56; }
.boton-chip:focus-visible { outline: 3px solid var(--alerta); }
.objetivo { position: absolute; top: 80px; left: 16px; background: var(--panel); border-radius: 16px;
  padding: 10px 18px; text-align: center; min-width: 120px; }
.objetivo span { display: block; font-size: 15px; opacity: .8; }
.objetivo strong { display: block; font-size: 72px; line-height: 1; color: var(--alerta); }
.objetivo img { display: none; max-width: 140px; max-height: 140px; margin-top: 8px; border-radius: 8px; }
.objetivo img.visible { display: block; }
#estadoMano.ok { background: #2c8a52; }
#estadoMano.falta { background: #a33a3a; }
#depuracion { background: rgba(0,0,0,.65); font-family: ui-monospace, monospace; font-size: 15px; }

/* Paneles */
.panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border-radius: 22px; padding: 26px;
  text-align: center; backdrop-filter: blur(6px); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
h1 { margin: 0 0 8px; font-size: clamp(28px, 6vw, 42px); }
h1 span { color: var(--alerta); }
h2 { margin: 0; font-size: 36px; }
.opciones { display: grid; gap: 12px; text-align: left; margin: 18px 0; }
.opciones label { display: grid; gap: 4px; font-weight: 600; }
.opciones label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
select { font-size: 16px; padding: 8px; border-radius: 8px; border: 0; }
input[type=checkbox] { width: 20px; height: 20px; }
.boton-grande { font-size: 22px; font-weight: 800; padding: 14px 34px; border: 0; border-radius: 14px;
  background: var(--acento); color: #08240f; cursor: pointer; }
.boton-grande:disabled { background: #666; color: #ccc; cursor: wait; }
.boton-grande:focus-visible { outline: 4px solid var(--alerta); outline-offset: 3px; }
.mensaje { color: var(--alerta); min-height: 1.2em; }
.nota { font-size: 13px; opacity: .7; }
.tiempo-final { font-size: 64px; font-weight: 800; margin: 10px 0; color: var(--alerta); font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .objetivo { top: auto; bottom: 70px; }
  .objetivo strong { font-size: 52px; }
  .reloj { font-size: 22px; min-width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.enlace-memorama { display: inline-block; margin-top: 14px; color: var(--texto); font-weight: 700; font-size: 18px;
  background: #444c56; padding: 10px 18px; border-radius: 12px; text-decoration: none; }
.enlace-memorama:focus-visible { outline: 3px solid var(--alerta); }

/* Marca Señas Games en la pantalla de inicio de los juegos */
.marca-juego { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--texto);
  text-decoration: none; text-align: left; }
.marca-juego:focus-visible { outline: 3px solid var(--alerta); outline-offset: 4px; border-radius: 12px; }
.marca-juego-icono { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 12px; overflow: hidden;
  background: #fff; border: 3px solid #fff; color: #12408F; font-size: 28px; font-weight: 800; }
.marca-juego-icono img { width: 100%; height: 100%; object-fit: contain; }
.marca-juego-texto { display: flex; flex-direction: column; line-height: 1.25; }
.marca-juego-texto strong { font-size: 20px; }
.marca-juego-texto span { font-size: 15px; opacity: .85; }
