/* Ajustes para la versión web: navegador y iPhone. Se carga después de styles.css. */

body.web .titlebar { -webkit-app-region: no-drag; }

.salir {
  font-family: 'Orbitron', sans-serif; font-size: 10px; letter-spacing: 3px;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  padding: 6px 12px; cursor: pointer; margin-left: auto;
}
.salir:hover { color: var(--cyan); border-color: var(--line-strong); }
.salir + .version { margin-left: 12px; }

/* ---------- teléfonos y pantallas angostas ---------- */
@media (max-width: 820px) {
  html, body { overflow: auto; height: auto; min-height: 100%; }
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .titlebar { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .brand-sub { display: none; }

  .layout {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  /* El núcleo primero, grande y fácil de tocar */
  .core { order: 1; height: 58vh; min-height: 360px; }
  .panel.right { order: 2; }
  .panel.left { order: 3; }

  .activate { font-size: 16px; padding: 16px 46px; }
  .log-card { min-height: 0; }
  .log { max-height: 42vh; }
  .log p { font-size: 16px; }

  .footer { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px 12px; }
  .meter { width: 90px; }
  .version { display: none; }
}

/* ---------- pantalla de acceso ---------- */
.acceso {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.acceso form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 16px; }
.acceso h1 {
  font-family: 'Orbitron', sans-serif; font-size: 28px; letter-spacing: 10px;
  color: var(--cyan); text-shadow: var(--glow); text-align: center;
}
.acceso p { color: var(--muted); text-align: center; letter-spacing: 1px; }
.acceso input {
  font: inherit; font-size: 18px; color: var(--text);
  background: rgba(62,232,255,0.05); border: 1px solid var(--line-strong);
  padding: 14px 16px; outline: none; user-select: text;
}
.acceso input:focus { border-color: var(--cyan); box-shadow: var(--glow); }
.acceso .activate { width: 100%; }
.acceso .error { color: var(--red); min-height: 1.4em; font-size: 14px; }
