/* Entry window (language + music). Shown on every visit. */
html.gate-on body { overflow: hidden; }
html.gate-on body > *:not(#gate):not(script) { visibility: hidden; }
.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #1a160b 0%, var(--bg, #0b0b0c) 60%);
  visibility: visible;
}
.gate-card {
  width: min(440px, 100%);
  padding: 36px 28px 28px;
  border: 1px solid var(--line, #2a2a2d);
  border-radius: 20px;
  background: var(--surface, #151517);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.gate-mark {
  margin: 0 0 18px;
  font: 600 1.15rem/1 var(--font-head, Georgia, serif);
  color: var(--text, #ede9df);
  letter-spacing: 0.01em;
}
.gate-mark b { color: var(--gold, #c9a24b); font-weight: 600; }
.gate-h {
  margin: 0 0 22px;
  display: grid;
  gap: 4px;
  font: 500 1.35rem/1.3 var(--font-head, Georgia, serif);
  color: var(--text, #ede9df);
}
.gate-h span[lang="ar"] { font-family: var(--font-body, system-ui, sans-serif); font-size: 1.15rem; color: var(--muted, #a8a498); }
.gate-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gate-lang {
  min-height: 56px;
  border: 1px solid var(--gold, #c9a24b);
  border-radius: 14px;
  background: transparent;
  color: var(--text, #ede9df);
  font: 600 1.1rem/1 var(--font-body, system-ui, sans-serif);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.gate-lang:hover,
.gate-lang:focus-visible { background: var(--gold, #c9a24b); color: #0b0b0c; }
.gate-lang:active { transform: scale(0.97); }
.gate-lang:disabled { opacity: 0.6; cursor: progress; }
.gate-music {
  margin: 22px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line, #2a2a2d);
  border-radius: 999px;
  background: transparent;
  color: var(--text, #ede9df);
  font: 500 0.95rem/1.2 var(--font-body, system-ui, sans-serif);
  cursor: pointer;
}
.gate-music:focus-visible { outline: 3px solid var(--gold-soft, #e2c77f); outline-offset: 2px; }
.gate-track {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--gold, #c9a24b);
  transition: background 0.2s;
}
.gate-track i {
  position: absolute;
  top: 3px;
  left: 21px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0b0b0c;
  transition: left 0.2s;
}
.gate-music.off .gate-track { background: #3a3a3e; }
.gate-music.off .gate-track i { left: 3px; background: var(--muted, #a8a498); }
.gate-mlabel { display: grid; gap: 2px; text-align: start; }
.gate-mlabel span[lang="ar"] { font-size: 0.85rem; color: var(--muted, #a8a498); }
.gate-mlabel em { font-style: normal; color: var(--gold-soft, #e2c77f); font-weight: 600; }
.gate-music.off .gate-mlabel em { color: var(--muted, #a8a498); }
@media (prefers-reduced-motion: reduce) {
  .gate-lang, .gate-track, .gate-track i { transition: none; }
}
