:root { color-scheme: light; }

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  color: #090909;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#game {
  position: fixed;
  inset: 0;
  min-height: 300px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
  font-size: clamp(11px, 2.7vw, 15px);
  letter-spacing: .08em;
  text-transform: uppercase;
}

#hint { color: #777; text-align: right; }

.hud-right { display: flex; align-items: center; gap: clamp(10px, 3vw, 24px); }

#skip {
  pointer-events: auto;
  border: 1.5px solid #090909;
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: #090909;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

#skip:hover, #skip:focus-visible { background: #090909; color: #fff; outline: none; }

#message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font: 800 clamp(42px, 12vw, 100px)/1 ui-monospace, monospace;
  opacity: 0;
  transform: scale(.84);
  transition: opacity .15s ease, transform .15s ease;
}

#message.show { opacity: 1; transform: scale(1); }

@media (max-width: 520px) and (orientation: portrait) {
  .hud { top: max(10px, env(safe-area-inset-top)); }
  #hint { max-width: 130px; }
}
