:root {
  color-scheme: dark;
  --bg: #12141a;
  --ink: #f3efe4;
  --muted: #d9d3c5;
  --gold: #f0c36a;
  --gold-hot: #ffd78a;
  --card: #1c2030;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#hint {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  max-width: calc(100% - 32px);
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  background: rgba(18, 20, 26, 0.78);
  border-radius: 999px;
  pointer-events: none;
}

#calibrate {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
}

button {
  font: inherit;
  font-size: 15px;
  color: #1a140f;
  background: var(--gold);
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

button:hover {
  background: var(--gold-hot);
}

button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  place-items: center;
  padding: 16px;
  background: rgba(8, 9, 12, 0.55);
}

.overlay:not([hidden]) {
  display: grid;
}

.card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

.card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 650;
}

.card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.4;
}
