@font-face {
  font-family: "Bebas Neue";
  src: url("fonts/bebas-neue.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #25337a;
  --line: #8198f1;
  --fg: #ffffff;
  --red: #f13a62;
  --blue: #00aac1;
  --condensed: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  touch-action: none;
}
#game {
  display: block;
  background: var(--bg);
  touch-action: none;
}
#score {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  font: 400 32px/1 var(--condensed);
  letter-spacing: .02em;
}
#pause {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: 400 26px/1 var(--condensed);
  letter-spacing: .1em;
  padding: 8px 12px;
  cursor: pointer;
}
#pause[hidden] { display: none; }
#overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
#overlay[hidden] { display: none; }
.card {
  width: min(360px, 100%);
  text-align: center;
  font-family: var(--condensed);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.card h1 {
  margin: 0 0 6px;
  font: 400 104px/1 var(--condensed);
  letter-spacing: .04em;
}
.card h1 .red { color: var(--red); }
.card h1 .blue { color: var(--blue); }
.card p { margin: 0 0 16px; font-size: 22px; line-height: 1.25; color: #dfe4ff; }
#ov-score { font-size: 96px; line-height: 1; margin-bottom: 4px; color: var(--fg); }
#ov-best { font-size: 26px; color: var(--line); }
.banner {
  display: block;
  margin: 8px auto 0;
  padding: 14px 24px;
  border-radius: 8px;
  background: var(--line);
  color: var(--fg) !important;
  font-size: 28px !important;
  line-height: 1.1 !important;
}
#overlay.over .card, #overlay.paused .card {
  padding: 20px 16px 16px;
  border-radius: 12px;
  background: rgba(37, 51, 122, .94);
}
/* The install bar sits where the cars drive; hide it during play. */
body.playing .pwa-install { display: none; }
