:root {
  --green: #008751;
  --green-dark: #006b40;
  --bg: #f6faf7;
  --text: #17231c;
  --muted: #5c6b63;
  --card: #ffffff;
  --line: #d8e5dc;
  --good: #1b8a4b;
  --bad: #c0392b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 17px;
}
.top { background: var(--green); padding: 12px 16px; }
.brand { color: #fff; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
main { max-width: 560px; margin: 0 auto; padding: 16px; min-height: 70vh; }
.view[hidden], [hidden] { display: none !important; }
.hero { text-align: center; padding: 16px 0 8px; }
.hero h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 10px; }
.small { font-size: 0.85rem; color: var(--muted); }
.section-title { font-size: 1.1rem; margin: 20px 0 10px; }
.game-list { display: grid; gap: 12px; }
.game-card {
  background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  padding: 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%;
}
.game-card:active { border-color: var(--green); }
.game-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.game-card p { margin: 0 0 8px; }
.play-pill {
  display: inline-block; background: var(--green); color: #fff; font-weight: 700;
  padding: 8px 18px; border-radius: 999px;
}
.btn {
  display: block; width: 100%; min-height: 52px; margin-top: 12px; padding: 12px 16px;
  background: var(--green); color: #fff; border: 0; border-radius: 12px;
  font: inherit; font-weight: 700; cursor: pointer;
}
.btn:active { background: var(--green-dark); }
.btn-alt { background: #fff; color: var(--green); border: 2px solid var(--green); }
.play-head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
#bar-fill { height: 100%; width: 0; background: var(--green); transition: width 0.3s; }
.timer { text-align: right; margin: 8px 0 0; font-weight: 700; color: var(--muted); }
.timer.low { color: var(--bad); }
.q-text { font-size: 1.2rem; line-height: 1.35; margin: 10px 0 14px; }
.options { display: grid; gap: 10px; }
.opt {
  min-height: 52px; text-align: left; padding: 12px 14px; font: inherit; color: inherit;
  background: var(--card); border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
}
.opt:active { border-color: var(--green); }
.opt.correct { border-color: var(--good); background: #e6f6ec; }
.opt.wrong { border-color: var(--bad); background: #fdeceb; }
.opt:disabled { cursor: default; }
.feedback { margin-top: 14px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 14px; }
.feedback p { margin: 0 0 8px; }
.verdict { font-weight: 800; font-size: 1.1rem; }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }
.result-card {
  background: var(--card); border: 2px solid var(--green); border-radius: 16px;
  text-align: center; padding: 24px 16px; margin-top: 8px;
}
.score { font-size: 3rem; font-weight: 800; margin: 4px 0; color: var(--green); }
.result-card h2 { margin: 0 0 8px; font-size: 1.4rem; }
.error { color: var(--bad); text-align: center; }
.foot { text-align: center; padding: 16px; color: var(--muted); }
.foot p { margin: 4px 0; }
