:root {
  color-scheme: dark;
  --ground: #0c0d0f;
  --ink: #e9eaec;
  --muted: #9a9ea6;
  --accent: #e9eaec;
  --accent-ink: #0c0d0f;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

#gate {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 12px;
  padding: 24px;
  max-width: 420px;
  margin: 0 auto;
}

#gate h1 { margin: 0; font-size: 20px; font-weight: 600; }
#gate p { margin: 0; color: var(--muted); }
#gate .note { font-size: 14px; min-height: 1.5em; }

button {
  font: inherit;
  font-weight: 600;
  padding: 10px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

#stage {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
}

#screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  outline: none;
}

#hud {
  position: absolute;
  top: 8px;
  left: 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.7);
  color: #d7f5d0;
  font: 12px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  pointer-events: none;
}

#screen { touch-action: none; user-select: none; -webkit-user-select: none; }

#cursor {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
}

#badge {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.7);
  color: var(--ink);
  font-size: 13px;
  pointer-events: none;
}

#gate .code {
  color: var(--ink);
  font: 600 22px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}
