:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: #f8fafc;
  background: #070a0f;
}

main {
  display: grid;
  grid-template-rows: 1fr auto;
  width: 100%;
  height: 100%;
  padding: clamp(24px, 5vw, 72px);
}

h1 {
  align-self: center;
  justify-self: center;
  max-width: 1250px;
  margin: 0;
  outline: none;
  color: #ffffff;
  font-size: clamp(3rem, 7vw, 7.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.055em;
  text-align: center;
  text-wrap: balance;
}

h1:focus { caret-color: #ffffff; }

#timer {
  justify-self: center;
  margin: 0;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(6rem, 20vw, 18rem);
  font-weight: 700;
  line-height: .78;
  letter-spacing: -0.1em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
}

#timer.finished { color: #fb7185; }

@media (max-width: 600px) {
  main { padding: 28px 18px 34px; }
  h1 { font-size: clamp(2.5rem, 12vw, 5rem); }
  #timer { font-size: clamp(5rem, 27vw, 8rem); }
}
