:root {
  --bg: #f4f6fb; --surface: #ffffff; --text: #16202e; --muted: #667085;
  --border: #dde3ee; --accent: #1f6feb; --accent-soft: #e3edff;
  --ok: #12805c; --ok-soft: #dcf5ea; --bad: #c4322b; --bad-soft: #fde4e2;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1420; --surface: #172131; --text: #e8edf5; --muted: #93a1b8;
    --border: #2a374b; --accent: #5b9bff; --accent-soft: #1d2f4f;
    --ok: #3ccf8e; --ok-soft: #123628; --bad: #ff7a72; --bad-soft: #3d1c1b;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; min-height: 100dvh;
}
.screen { display: none; flex-direction: column; gap: 14px; }
.screen.active { display: flex; }
h1 { font-size: 30px; line-height: 1.1; margin: 8px 0 4px; }
h1 span { color: var(--accent); }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.muted { color: var(--muted); margin: 0; font-size: 15px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.center { text-align: center; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.mode span { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; height: 100%; }
.mode small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.mode input:checked + span { border-color: var(--accent); background: var(--accent-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--border); font-weight: 600; cursor: pointer; }
.chip small { font-weight: 400; color: var(--muted); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.chip input:checked + span small { color: #ffffffcc; }

.switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.switch em { color: var(--muted); font-style: normal; }

.btn { appearance: none; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; padding: 13px 18px; border-radius: 14px; cursor: pointer; width: 100%; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.big { padding: 17px; font-size: 19px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn:disabled { opacity: .45; }
.icon-btn { appearance: none; border: 0; background: var(--surface); color: var(--text); width: 42px; height: 42px; border-radius: 12px; font-size: 20px; cursor: pointer; flex: none; border: 1px solid var(--border); }

.quiz-top { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.counter { font-size: 14px; color: var(--muted); min-width: 48px; text-align: right; }

.question { text-align: center; padding: 22px 16px; }
.question .lvl { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.question .base { font-size: 40px; font-weight: 800; margin: 8px 0 2px; letter-spacing: -.01em; }
.question .pl { color: var(--muted); font-size: 17px; }
.question .ask { margin-top: 14px; font-size: 15px; }
.speak { appearance: none; border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 6px 14px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 10px; }
.big-speak { font-size: 54px; width: 120px; height: 120px; border-radius: 50%; padding: 0; margin: 6px auto; display: block; }

.forms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.field input { width: 100%; font: inherit; font-size: 20px; padding: 13px 12px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); }
.field input:focus { outline: none; border-color: var(--accent); }
.field input.ok { border-color: var(--ok); background: var(--ok-soft); }
.field input.bad { border-color: var(--bad); background: var(--bad-soft); }
.field .fix { font-size: 15px; color: var(--ok); font-weight: 700; margin-top: 4px; min-height: 1.2em; }

.options { display: grid; gap: 10px; }
.opt { text-align: left; font-size: 20px; padding: 16px 18px; }
.opt.ok { border-color: var(--ok); background: var(--ok-soft); }
.opt.bad { border-color: var(--bad); background: var(--bad-soft); }

.feedback { border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.feedback.ok { background: var(--ok-soft); color: var(--ok); }
.feedback.bad { background: var(--bad-soft); color: var(--bad); }
.feedback .full { display: block; font-weight: 400; color: var(--text); margin-top: 2px; }

.flash { min-height: 230px; display: flex; flex-direction: column; justify-content: center; }
.flash .answer { font-size: 26px; font-weight: 700; margin-top: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.bad { border-color: var(--bad); color: var(--bad); }
.btn.ok { border-color: var(--ok); color: var(--ok); }

.score { font-size: 56px; font-weight: 800; color: var(--accent); }
.verb-list { list-style: none; padding: 0; margin: 0; }
.verb-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.verb-list li:last-child { border-bottom: 0; }
.verb-list .f { font-weight: 600; }
.verb-list .f i { font-style: normal; color: var(--muted); font-weight: 400; }
.verb-list .p { color: var(--muted); font-size: 14px; }
.verb-list .lv { font-size: 11px; font-weight: 700; color: var(--accent); margin-left: 4px; }
#screen-list .verb-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 12px; }
#search { flex: 1; font: inherit; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.mini-speak { flex: none; background: none; border: 0; font-size: 20px; cursor: pointer; padding: 4px; }
