:root {
  --ink: #2b1d14; --paper: #fff7ea; --accent: #ff7a2f; --accent-dark: #d95a12; --muted: #8a7462;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
canvas.full { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(43, 29, 20, 0.35); z-index: 10;
}
.card {
  width: 100%; max-width: 360px; background: var(--paper);
  border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 var(--ink);
  padding: 22px 20px 18px; text-align: center;
}
.logo { font-size: 46px; line-height: 1; }
h1, h2 { margin: 8px 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -0.5px; }
h2 { font-size: 26px; }
.sub { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.rules { font-size: 13px; color: var(--muted); margin: 8px 0 16px; line-height: 1.6; }
.challenge {
  background: #fff0c9; border: 2px dashed var(--accent-dark); border-radius: 12px;
  padding: 10px; margin: 6px 0 4px; font-weight: 700; font-size: 15px;
}
.btn {
  display: block; width: 100%; margin-top: 10px; padding: 14px;
  border-radius: 14px; border: 3px solid var(--ink); background: #fff;
  font-size: 17px; font-weight: 800; color: var(--ink); box-shadow: 0 4px 0 var(--ink); font-family: inherit;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--accent-dark); font-size: 15px; }
.score { font-size: 56px; font-weight: 900; line-height: 1; margin: 6px 0; }
.breakdown { color: var(--muted); font-size: 14px; }
.verdict { margin: 10px 0 4px; font-weight: 700; font-size: 16px; min-height: 20px; }
.best { margin-top: 10px; color: var(--muted); font-size: 13px; }
