@font-face {
  font-family: Inter;
  src: url(assets/inter.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url(assets/space-grotesk.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --cream: #fbf3e4;
  --surface: #fffcf6;
  --forest: #183c32;
  --ink: #15130f;
  --muted: #4a554b;
  --line: #d9dfcc;
  --coral: #ee5e24;
  --yellow: #ffc857;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--forest);
  color: var(--cream);
  font-family: Inter, system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
.stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgb(24 60 50 / 0.96);
  border: 1px solid rgb(255 252 246 / 0.22);
  box-shadow: 0 3px 0 rgb(15 43 35 / 0.25);
  font-size: clamp(15px, 3.6vmin, 20px);
  font-weight: 700;
}
.stat .label { font-size: 0.62em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #d9e4cc; }
.stat strong { min-width: 1.2em; font-variant-numeric: tabular-nums; color: var(--yellow); }
.btn:focus-visible, .prompt:focus-visible { outline: 3px solid #3255d8; outline-offset: 3px; }
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  background: rgb(12 38 30 / 0.52);
  overflow-y: auto;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.4vmin, 10px);
  width: min(410px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: clamp(16px, 3.5vmin, 26px);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 8px 0 rgb(12 38 30 / 0.25), 0 22px 60px rgb(12 38 30 / 0.3);
}
.club-art {
  width: 100%;
  height: clamp(60px, 18vh, 120px);
  min-height: 60px;
  flex-shrink: 0;
  border-radius: 14px;
  background: #d1dfc1 url(assets/club-cover.webp) center 52% / cover;
}
.overlay h1, .overlay h2 {
  margin: 0;
  font: 700 clamp(30px, 8vmin, 48px)/1 "Space Grotesk", Inter, sans-serif;
  letter-spacing: -0.055em;
  color: var(--forest);
}
.overlay p { margin: 0; color: var(--muted); font-size: clamp(13px, 3.4vmin, 16px); line-height: 1.4; }
.overlay .eyebrow { color: var(--forest); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; }
.overlay .goal { color: var(--ink); }
.overlay .hint { max-width: 31ch; font-size: clamp(12px, 2.8vmin, 14px); }
.overlay .result { font-size: clamp(22px, 5vmin, 30px); color: var(--forest); font-weight: 700; }
.overlay .result strong { font-size: 1.35em; }
.overlay .best strong, .overlay .best-line strong { color: var(--forest); }
.overlay .best-line { font-size: 12px; }
.overlay .stats { font-size: 13px; }
.overlay .next-target { padding: 10px 12px; border-radius: 12px; background: #edf0e1; color: var(--forest); font-size: 13px; font-weight: 600; }
.overlay .verdict { font-size: clamp(16px, 4vmin, 20px); font-weight: 700; color: #28623c; }
.overlay .verdict.lose { color: #a33228; }
.tracker {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 7px 9px;
  list-style: none;
  border-radius: 999px;
  background: rgb(24 60 50 / 0.96);
  border: 1px solid rgb(255 252 246 / 0.22);
  pointer-events: none;
}
.kick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #9db6a2; font-size: 13px; font-weight: 700; line-height: 1; color: var(--forest); }
.kick.current { border-color: var(--yellow); box-shadow: 0 0 0 2px rgb(255 200 87 / 0.28); }
.kick.goal { background: #d9edb2; border-color: #d9edb2; }
.kick.saved { border-radius: 5px; background: #ffae8c; border-color: #ffae8c; }
.kick.miss { border-radius: 3px; transform: rotate(45deg) scale(0.82); background: #c1c9b9; border-color: #c1c9b9; }
.kick.miss span { transform: rotate(-45deg); }
.prompt {
  position: fixed;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 10px 17px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 0 rgb(12 38 30 / 0.25);
  color: var(--forest);
  font-size: clamp(12px, 3.4vmin, 16px);
  font-weight: 700;
  font-family: Inter,system-ui,sans-serif;
  min-height: 52px;
  cursor: pointer;
  touch-action: manipulation;
  text-align: center;
}
.round-goal { display: block; margin-top: 4px; font-size: 10px; font-weight: 500; color: var(--muted); }
.prompt:active { background: #edf0e1; }
.btn {
  min-width: 178px;
  min-height: 48px;
  margin-top: 4px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  font: 700 18px/1.2 Inter, sans-serif;
  cursor: pointer;
  box-shadow: 0 5px 0 #b8400f;
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.btn:hover { background: #ff9550; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #b8400f; }
.hidden { display: none !important; }
@media (max-width: 760px) { .tracker { top: calc(max(8px, env(safe-area-inset-top)) + 46px); } }
@media (orientation: landscape) and (max-height: 500px) { .prompt { left: auto; right: 12px; transform: none; } }
@media (max-height: 420px) { .club-art { display: none; } .card { gap: 6px; padding: 14px 18px; } .btn { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
