:root {
  color-scheme: dark;
  --ink: #f4efe4;
  --muted: #b7ad9c;
  --gold: #f0c36a;
  --panel: rgba(8, 10, 18, 0.72);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #070814;
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  touch-action: none;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  pointer-events: none;
}

.brand,
#score,
#best {
  margin: 0;
}

.brand {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
}

#score {
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

#best {
  color: var(--muted);
}

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(4, 6, 12, 0.45);
}

#overlay[hidden] {
  display: none;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 560;
  letter-spacing: 0.04em;
}

#overlay-text,
.hint {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.5;
}

#start {
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  background: var(--gold);
  color: #241806;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

#start:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
