/* Tower Defensor — estilos mínimos: toda la interfaz se dibuja en el canvas */
:root { color-scheme: dark; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; overscroll-behavior: none;
  background: #3e6b4b;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
body { position: fixed; inset: 0; }
#game {
  position: absolute; left: 0; top: 0; display: block;
  image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; image-rendering: pixelated;
  touch-action: none; outline: none; cursor: default;
}
/* Sonda: el juego lee de aquí las zonas seguras (notch, barra de inicio) */
#sonda {
  position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.aviso { margin: 2rem; font: 16px/1.4 system-ui, sans-serif; color: #f7f0e3; text-align: center; }
/* Color de las bandas según el bioma (clave `tema` de BIOMAS) */
body.tema-pradera  { background: #3e6b4b; }
body.tema-bosque   { background: #4a3b52; }
body.tema-desierto { background: #8a5a44; }
body.tema-nieve    { background: #3b5687; }
body.tema-pantano  { background: #3e6b4b; }
body.tema-volcan   { background: #5c3a31; }
body.tema-castillo { background: #2e222f; }
/* Página de entrar (entrar.html, doc 10 §10): HTML de verdad, con los colores del juego */
html.entrar, html.entrar body {
  overflow: auto; touch-action: manipulation; -webkit-user-select: auto; user-select: auto; -webkit-touch-callout: default;
}
html.entrar body {
  height: auto; min-height: 100%; position: static; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  font: 16px/1.3 ui-monospace, Menlo, Consolas, monospace; color: #2e222f;
}
.panel {
  width: 100%; max-width: 360px; box-sizing: border-box; padding: 20px; text-transform: uppercase;
  background: #f0dcae; border: 4px solid #5c3a31; box-shadow: 0 0 0 4px #2e222f, inset 0 -4px 0 #dbb07a;
}
.panel h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: 2px; color: #5c3a31; text-align: center; }
.panel .sub { margin: 0 0 8px; font-size: 12px; color: #8a5a44; text-align: center; }
.panel label { display: block; margin: 12px 0 4px; font-size: 13px; letter-spacing: 1px; }
.panel input {
  display: block; width: 100%; box-sizing: border-box; padding: 10px; font: inherit; text-transform: none;
  color: #2e222f; background: #f7f0e3; border: 3px solid #5c3a31; border-radius: 0; -webkit-appearance: none; appearance: none;
}
.panel input:focus { outline: 3px solid #f5cb5c; outline-offset: 0; }
.panel button {
  display: block; width: 100%; margin-top: 12px; padding: 12px; font: inherit; letter-spacing: 2px; text-transform: uppercase;
  color: #f7f0e3; background: #62a05a; border: 3px solid #2e222f; border-radius: 0; box-shadow: inset 0 -4px 0 #3e6b4b;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.panel button:focus-visible { outline: 3px solid #f5cb5c; }
.panel button:active { box-shadow: inset 0 4px 0 #3e6b4b; }
.panel button:disabled { background: #9b94a3; box-shadow: inset 0 -4px 0 #6b6373; cursor: default; }
.panel .msg { min-height: 1.3em; margin: 12px 0 0; font-size: 13px; color: #a3404c; }
.panel .volver { display: block; margin-top: 16px; font-size: 13px; color: #5c3a31; text-align: center; }
