:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}
/* Layout: a cartoon platformer card. One vector board with bold dark outlines, flat bright fills and simple highlights,
   framed like a sticker on a Midnight ground. Chunky outlined cards for the start, the catch and the finish. One deliberate dark look. */
:root {
  --ground: #300A44; --midnight: #300A44; --m20: #D6CEDA;
  --out: #300A44; --orange: #FF5438; --purple: #4716ED; --yellow: #FFD400; --cyan: #00FFFF;
  --grass: #339780; --white: #FFFFFF; --ink: #18161A; --paper: #F6F4EE;
  --font: "Poppins", "Helvetica Neue", helvetica, arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground); color: var(--white);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font-family: var(--font); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.app { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding-inline: 16px; }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 560px;
  padding-block: 14px 10px;
}
.wordmark { width: 96px; height: auto; display: block; }
.clock {
  font: 600 12px/1.4 var(--font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.clock.is-late { color: var(--orange); }

.play { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stage {
  position: relative; overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 0 0 4px var(--out), 0 8px 0 4px var(--out);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.stage:focus-visible { outline-offset: 8px; }
.stage canvas { display: block; touch-action: none; }
.hint {
  margin: 22px 0 18px; text-align: center;
  font: 500 13px/1.4 var(--font); letter-spacing: .06em; color: var(--m20);
}

/* Cards over the board: chunky outlined panels with a hard drop shadow */
.overlay {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; padding: 16px;
  overflow-y: auto; overscroll-behavior: contain;
  background: rgba(48, 10, 68, .45);
}
.card {
  width: min(330px, 100%);
  padding: 22px 20px 22px;
  background: var(--paper); color: var(--ink); text-align: center;
  border: 3px solid var(--out); border-radius: 22px;
  box-shadow: 0 7px 0 var(--out);
  animation: bounce-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes bounce-in { from { transform: translateY(18px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.eyebrow {
  margin: 0 0 4px;
  font: 600 12px/1.4 var(--font); letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple);
}
.eyebrow--orange { color: var(--orange); }
.eyebrow--green { color: #007D60; }
.logo {
  margin: 2px 0 12px;
  font: 600 40px/1 var(--font); letter-spacing: -0.01em;
  color: var(--yellow);
  -webkit-text-stroke: 7px var(--out); paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--out);
  text-wrap: balance;
}
.card-big { margin: 0 0 10px; font: 600 19px/1.3 var(--font); color: var(--midnight); text-wrap: balance; }
.card-text { margin: 0 0 18px; font: 400 15px/1.5 var(--font); color: var(--ink); text-wrap: balance; }
.score-line {
  margin: -6px 0 18px; font: 600 13px/1.4 var(--font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--purple); font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border: 3px solid var(--out); border-radius: 999px; cursor: pointer;
  font: 600 15px/1 var(--font);
  box-shadow: 0 5px 0 var(--out);
  transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--out); }
.btn--orange { background: var(--orange); color: var(--midnight); }
.btn--ghost { background: var(--white); color: var(--purple); }
.btn--ghost:hover { background: #ECE7FD; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* The end */
.app.is-ended .bar { display: none; }
.end { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 440px; text-align: center; padding-block: 24px 40px; }
.scene { width: 100%; margin: 12px 0 24px; overflow: hidden; border-radius: 18px; box-shadow: 0 0 0 4px var(--out), 0 8px 0 4px var(--out); }
.scene svg { display: block; width: 100%; height: auto; }
.display:focus { outline: none; }
.display { margin: 8px 0 8px; font: 600 clamp(24px, 7vw, 32px)/1.15 var(--font); text-wrap: balance; }
.lead { margin: 0 0 24px; font: 300 18px/1.45 var(--font); max-width: 26em; text-wrap: balance; }
.meta { margin: 8px 0 0; font: 300 14px/1.5 var(--font); color: var(--m20); }

/* Guilt trip */
.modal {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center; padding: 16px;
  background: rgba(48, 10, 68, .75);
}
.modal-title { margin: 0 0 20px; font: 600 20px/1.3 var(--font); color: var(--midnight); text-wrap: balance; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
