/* Interfaz auxiliar: barra tactil, aviso de orientacion, enlace de salto, alto contraste y lector de pantalla. */

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- enlace de salto a la version de texto ---- */
.skip {
  position: fixed;
  left: 8px; top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: #000;
  color: #fff;
  font: 16px/1.2 "Perfect DOS VGA 437", monospace;
  text-decoration: none;
  border: 2px solid #fff;
  transition: top .15s;
}
.skip:focus { top: 8px; outline: 3px solid #2b7bff; }

/* ---- teclado virtual: <input> invisible ---- */
#vkbd {
  position: fixed;
  left: 0; bottom: 0;
  width: 1px; height: 1px;
  padding: 0; border: 0;
  opacity: 0;
  font-size: 16px;           /* evita el zoom automatico de iOS */
  pointer-events: none;
}

/* ---- barra de teclas rapidas (solo tactil y con el ordenador encendido) ---- */
#qbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: none;
  gap: 6px;
  height: 52px;
  box-sizing: border-box;
  padding: 6px 8px;
  overflow-x: auto;
  background: #1c1c1c;
  border-top: 2px solid #555;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#qbar::-webkit-scrollbar { display: none; }
body.touch.on #qbar { display: flex; }
#qbar button {
  flex: 0 0 auto;
  min-width: 46px;
  height: 40px;
  padding: 0 10px;
  font: 17px/1 "Perfect DOS VGA 437", monospace;
  color: #d8d8d8;
  background: #2f2f2f;
  border: 2px solid #777;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#qbar button:active { background: #55aa55; color: #000; }
#qbar button.enter { background: #1d3d1d; border-color: #55aa55; }
body.kbd #qbar button.kb { background: #55aa55; color: #000; }

/* ---- aviso de orientacion ---- */
#rotate-hint {
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: 21;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #111;
  color: #fff;
  font: 16px/1.25 "Perfect DOS VGA 437", monospace;
  border-bottom: 2px solid #55aa55;
}
#rotate-hint span { flex: 1; }
#rotate-hint button {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  font: 22px/1 "Perfect DOS VGA 437", monospace;
  color: #fff; background: #333;
  border: 2px solid #777; border-radius: 4px;
}
@media (orientation: portrait) {
  body.touch.on #rotate-hint { display: flex; }
}

/* ---- alto contraste: texto del DOS mas luminoso y sin efectos de pantalla ---- */
body.hc #glow,
body.hc .scanlines,
body.hc .vignette,
body.hc .reflection { display: none !important; }
body.hc #screen { filter: contrast(1.25) brightness(1.15); }

@media (prefers-contrast: more) {
  .skip { top: 8px; }
}

/* ---- aviso sin JavaScript (<noscript>) ---- */
#noscript {
  position: fixed;
  inset: 0;
  z-index: 100;
  box-sizing: border-box;
  padding: 1.2rem;
  overflow: auto;
  background: #000;
  color: #ddd;
  font: 18px/1.5 monospace;
}
#noscript h1 { color: #fff; font-size: 1.3rem; }
#noscript a { color: #6cf; }

/* ---- solo pruebas (?cspcheck) ---- */
.sr-cspout { position: fixed; left: 6px; bottom: 6px; z-index: 99; margin: 0; padding: 6px 8px; max-width: 90vw;
  background: #fff; color: #b00; font: 13px/1.3 monospace; white-space: pre-wrap; }
