@font-face {
  font-family: Poppins;
  src: url('assets/fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('assets/fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('assets/fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  font-family: Poppins, system-ui, sans-serif;
  color: #1a1a1a;
  background: #f9f9f9;
  --plum: #86529a;
  --vermelho: #ff3131;
  --verde: #7ed957;
  --ink-muted: #545454;
  --line: #e2e2e2;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #047379; outline-offset: 5px; }
.site-width { width: min(930px, calc(100% - 64px)); margin-inline: auto; }
main { padding-bottom: 28px; }
.masthead {
  display: flex;
  align-items: center;
  padding: 28px 0 19px;
  border-bottom: 1px solid var(--line);
}
.masthead img { width: 108px; height: auto; display: block; }
.launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 10px;
  white-space: nowrap;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}
.launch-dot { flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--verde); }
.intro { padding: clamp(42px, 6.5vh, 63px) 0 51px; text-align: center; }
.intro h1 {
  max-width: 17ch;
  margin: 0 auto;
  font-size: clamp(30px, 3.35vw, 42px);
  line-height: 1.16;
  letter-spacing: -.035em;
  font-weight: 600;
}
.arcade {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
}
.scoreboard {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}
.score-title { display: flex; justify-content: space-between; gap: 12px; margin: 0; color: var(--ink-muted); font-size: 12px; font-weight: 500; }
#score { color: #1a1a1a; font-weight: 600; font-variant-numeric: tabular-nums; }
.track { position: relative; height: clamp(172px, 27vh, 236px); background: #f1f1f1; touch-action: manipulation; cursor: pointer; }
canvas { width: 100%; height: 100%; display: block; }
.obstacle-message {
  position: absolute;
  z-index: 1;
  inset: 12px auto auto 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 4px 10px;
  border-radius: 100vmax;
  background: var(--vermelho);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 20px;
  text-align: center;
  background: #f9f9f9f2;
  pointer-events: none;
}
.result-title { margin: 0; font-size: clamp(23px, 5vw, 38px); font-weight: 600; letter-spacing: -.035em; line-height: 1.15; }
.result-copy { margin: 9px 0 0; font-size: 13px; color: var(--ink-muted); }
.control-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 12px 20px; border-top: 1px solid var(--line); }
#controls { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-muted); font-size: 12px; }
.touch-control { display: none; }
#action {
  min-height: 44px;
  min-width: 108px;
  padding: 8px 15px;
  border: 0;
  border-radius: 100vmax;
  color: #fff;
  background: var(--plum);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
#action:hover { background: #734485; }
#action:active { transform: translateY(1px); }
.waiting-footer { display: grid; justify-items: center; gap: 18px; margin-top: 26px; text-align: center; }
.waiting-footer-action p { margin: 0 0 7px; color: var(--ink-muted); font-size: 13px; }
.hard-link {
  min-height: 44px;
  display: inline-block;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 100vmax;
  background: #fff;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
}
.hard-link span { color: var(--vermelho); white-space: nowrap; }
.hard-link:hover { background: #f1f1f1; }
.social-link { color: var(--ink-muted); font-size: 12px; text-decoration-color: #a0a0a0; text-underline-offset: 4px; }
.social-link:hover { color: var(--plum); }
.no-js { margin: 0; padding: 12px 20px; font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (pointer: coarse) {
  .desktop-control { display: none; }
  .touch-control { display: inline; }
}
@media (max-width: 734px) {
  .intro { padding-block: clamp(39px, 12vw, 53px) 46px; }
  .intro h1 { font-size: 26px; }
}
@media (max-width: 520px) {
  .site-width { width: calc(100% - 34px); }
  .masthead { padding: 21px 0 15px; }
  .masthead img { width: 80px; }
  .launch { font-size: 11px; }
  .arcade { border-radius: 17px; }
  .scoreboard { padding-inline: 12px; }
  .control-bar { padding: 10px; }
  #action { min-width: 83px; }
}
