*{box-sizing:border-box}
:root{
  --bg:#f7f9fc;
  --text:#1d2939;
  --muted:#667085;
  --ok:#16a34a;
  --bad:#dc2626;
  --chip:#ffffff;
  --shadow:0 6px 20px rgba(17,24,39,.08);
  --radius:16px;
  --brand:#E3F2FD;
  --accent:#111827;
}
html,body{height:100%}
body{
  margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--text); background:var(--bg);
  display:flex; flex-direction:column;
}
.app-header{
  position:sticky; top:0; z-index:10;
  background:#fff; box-shadow:var(--shadow);
  padding:16px 20px; display:flex; align-items:center; justify-content:space-between;
}
.app-header h1{margin:0; font-size:clamp(1.2rem,1rem + 1vw,1.8rem)}
.meta{display:flex; align-items:center; gap:12px}
.score{font-weight:600}
.progress{color:var(--muted)}
.btn{
  border:0; background:var(--accent); color:#fff; padding:10px 14px; border-radius:12px;
  cursor:pointer; box-shadow:var(--shadow);
}
.btn.secondary{ background:#334155; }
.btn:disabled{opacity:.6; cursor:not-allowed}
.app-main{ width:min(900px,96%); margin:18px auto; display:flex; flex-direction:column; gap:16px}
.instructions{ background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:12px 16px; color:var(--muted)}
.card{
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
  padding:18px; display:flex; flex-direction:column; gap:16px;
}
.sentence{
  background:var(--brand);
  border-radius:14px; padding:14px; font-size:clamp(1.1rem,1rem + .6vw,1.6rem); line-height:1.6;
}
.options{ display:grid; grid-template-columns: 1fr 1fr; gap:12px }
.opt{
  border:2px solid transparent; background:#fff; border-radius:14px; padding:14px;
  font-weight:700; box-shadow:var(--shadow); cursor:pointer; transition:transform .12s ease;
}
.opt:hover{ transform: translateY(-1px) }
.opt.correct{ outline:3px solid var(--ok) }
.opt.wrong{ outline:3px solid var(--bad); animation:shake .18s linear 2 }
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
.feedback{ min-height:22px; color:var(--muted)}
.feedback.good{ color:var(--ok); font-weight:700 }
.feedback.bad{ color:var(--bad); font-weight:700 }
.nav{ display:flex; justify-content:flex-end }
.legend{ display:flex; gap:10px; align-items:center; color:var(--muted); padding:0 2px }
.chip{ padding:6px 10px; border-radius:999px; box-shadow:var(--shadow); background:#fff; }
.subj{ border:2px solid #3b82f6 }
.obj{ border:2px solid #f59e0b }
.app-footer{ text-align:center; color:var(--muted); padding:20px 0 28px }
@media (max-width:720px){ .options{ grid-template-columns:1fr } }
