@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/press-start-2p.woff2") format("woff2");
}

:root {
  --bg: #fff;
  --ink: #000;
}

body.night {
  --bg: #000;
  --ink: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Press Start 2P", monospace;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* mobile URL-bar-proof */
}

.wordmark {
  position: fixed;
  top: max(24px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
  font-size: clamp(10px, 1.4vw, 16px);
  font-weight: 400;
  letter-spacing: 0.12em;
  user-select: none;
}

.score {
  position: fixed;
  top: max(24px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  font-size: clamp(9px, 1vw, 12px);
  letter-spacing: 0.1em;
  user-select: none;
}

.contact {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(24px, env(safe-area-inset-left));
  font-size: clamp(8px, 0.9vw, 11px);
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}

/* narrow screens: wordmark and score share one cramped top row */
@media (max-width: 560px) {
  .wordmark { font-size: 9px; letter-spacing: 0.08em; }
  .score { font-size: 9px; top: max(25px, env(safe-area-inset-top)); }
}

.contact:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}
