/* ============================================================
   gate.css — the door before the boot: one line, two keys.
   Sits under #crt-overlay (z 9000) so it wears the same scanlines.
   ============================================================ */

#entry-gate {
  position: fixed;
  inset: 0;
  z-index: 8800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg, #03060a);
  opacity: 1;
  transition: opacity 0.25s ease;
}
#entry-gate.eg-gone { opacity: 0; pointer-events: none; }

#entry-gate .eg-card {
  width: min(720px, 100%);
  text-align: center;
}

#entry-gate .eg-line {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: clamp(13px, 2.4vw, 18px);
  line-height: 1.6;
  color: var(--green, #38ff9c);
  text-shadow: var(--glow, 0 0 6px rgba(56, 255, 156, 0.55));
  margin: 0 0 28px;
  text-wrap: balance;
}
#entry-gate .eg-cur {
  display: inline-block;
  color: var(--green, #38ff9c);
  animation: eg-blink 1.1s steps(2, start) infinite;
}
@keyframes eg-blink { 50% { opacity: 0; } }

#entry-gate .eg-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  width: min(480px, 100%);
  margin: 0 auto;
}

#entry-gate .eg-btn {
  flex: 1 1 0;
  min-width: 0;
  background: rgba(3, 8, 6, 0.92);
  border: 3px solid var(--green-dim, #1f8d59);
  color: var(--green, #38ff9c);
  font-family: var(--px-title, 'Press Start 2P', 'VT323', monospace);
  font-size: clamp(11px, 1.8vw, 15px);
  letter-spacing: 0.04em;
  line-height: 1.4;
  padding: 16px 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
#entry-gate .eg-btn:hover,
#entry-gate .eg-btn:focus-visible {
  outline: none;
  border-color: var(--green, #38ff9c);
  background: rgba(10, 40, 24, 0.88);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(56, 255, 156, 0.18);
}
#entry-gate .eg-btn:active { transform: translateY(1px); }
#entry-gate .eg-go { border-color: var(--green, #38ff9c); }

/* the install offer keeps its own line under START: the browser announces it
   late, and a second key inside the row would slide START under a moving hand */
#entry-gate .eg-install {
  display: block;
  width: min(480px, 100%);
  margin: 12px auto 0;
  border-color: var(--green-dim, #1f8d59);
}
/* just landed — deaf for a moment, so a finger already in flight misses it */
#entry-gate .eg-btn.eg-cold { pointer-events: none; }
/* the slot is held open from the first paint (hidden, not removed): the browser
   announces the offer late, and nothing on the door may move by then */
#entry-gate .eg-btn.eg-off { visibility: hidden; pointer-events: none; }

/* the fullscreen key belongs to the door too (boot.css hides it under the boot
   screen, and the door stands on top of that screen) */
body.eg-on #boot-screen.active ~ #fs-btn { display: block; }

#entry-gate .eg-hint {
  display: none;
  margin: 18px 0 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: clamp(11px, 1.6vw, 13px);
  color: var(--amber, #ffb347);
  opacity: 0.85;
}
#entry-gate .eg-hint.on { display: block; }

/* narrow phones: the keys stack rather than shrink out of reach */
@media (max-width: 420px) {
  #entry-gate .eg-row { flex-direction: column; width: 100%; gap: 10px; }
  #entry-gate .eg-btn { padding: 14px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #entry-gate .eg-cur { animation: none; }
  #entry-gate { transition: none; }
}
