@font-face {
  font-family: "Luckiest Guy";
  src: url("fonts/luckiest-guy.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --sky: #f9dd45;
  --fg: #3a2a10;
  --red: #ee3c1f;
  --blue: #2079ea;
  --green: #7ed321;
  --bubble: "Luckiest Guy", "Arial Rounded MT Bold", Impact, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--sky);
  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;
  touch-action: none;
  outline: none;
}
#game {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--sky);
  touch-action: none;
}
#overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
#overlay[hidden] { display: none; }
/* Portrait viewport: the canvas draws the arena rotated a quarter turn clockwise (game left = screen
 * top, game top = screen right), so rotate the menu the same way to keep the app landscape. */
@media (orientation: portrait) {
  #overlay {
    inset: auto;
    top: 0;
    left: 0;
    width: 100vh;
    height: 100vw;
    transform-origin: 0 0;
    transform: rotate(90deg) translateY(-100%);
  }
  .pwa-install {
    left: auto;
    right: max(16px, env(safe-area-inset-right));
    bottom: auto;
    top: 50%;
    transform: rotate(90deg) translate(50%, -50%);
    transform-origin: 100% 50%;
  }
}
.card {
  width: min(440px, 100%);
  text-align: center;
  font-family: var(--bubble);
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: rgba(255, 244, 190, .88);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .12), 0 0 0 5px #fff;
}
.card h1 {
  margin: 0 0 4px;
  font: 400 clamp(64px, 16vmin, 96px)/1 var(--bubble);
  color: #fff;
  -webkit-text-stroke: 0;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, .18),
    -3px -3px 0 #fff, 3px -3px 0 #fff, -3px 3px 0 #fff, 3px 3px 0 #fff,
    0 -4px 0 #fff, 0 4px 0 #fff, -4px 0 0 #fff, 4px 0 0 #fff;
}
.card h1 .red { color: var(--red); }
.card h1 .blue { color: var(--blue); }
.card p {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.25;
  color: #fff;
  text-shadow: -2px -2px 0 #5a3d12, 2px -2px 0 #5a3d12, -2px 2px 0 #5a3d12, 2px 2px 0 #5a3d12, 0 3px 0 #5a3d12;
}
#ov-result { font-size: 40px; line-height: 1.1; }
#ov-result .red { color: var(--red); }
#ov-result .blue { color: var(--blue); }
.buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.banner {
  appearance: none;
  border: 4px solid #fff;
  cursor: pointer;
  margin: 0;
  padding: 12px 26px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 400 30px/1.1 var(--bubble);
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .2);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}
.banner:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
#btn-1p { background: var(--red); }
.card { position: relative; }
.round-btn {
  appearance: none;
  position: absolute;
  top: -14px;
  right: -14px;
  width: 56px;
  height: 56px;
  padding: 12px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .2);
}
.round-btn svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.round-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.round-btn[hidden] { display: none; }
#ov-result .streak { display: block; margin-top: 6px; font-size: 22px; }
.hint { font-size: 15px !important; margin: 16px 0 0 !important; }
.hint kbd { font: inherit; padding: 0 6px; border-radius: 6px; background: #fff; color: var(--fg); text-shadow: none; }
@media (hover: none) and (pointer: coarse) { .hint { display: none; } }
/* The install bar would cover the jump buttons; hide it during play. */
body.playing .pwa-install { display: none; }
