/* Question cards, options, feedback, essay trainer. */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.score { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.label { color: var(--muted); font-size: 0.88rem; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sentence { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 24px; }
.sentence.incorrect { color: var(--bad); font-weight: 400; }
.card .label { margin-bottom: 12px; }

/* ── Options ────────────────────────────────────────────────────────────── */
.options { display: grid; gap: 12px; }

.opt {
  text-align: left;
  min-height: 52px;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: #fafafa;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
@media (hover: hover) {
  .opt:hover:not(:disabled) { border-color: var(--accent); background: #f0f7ff; }
}
.opt:disabled { cursor: default; }
.opt.correct { border-color: var(--good); background: var(--good-bg); }
.opt.wrong   { border-color: var(--bad); background: var(--bad-bg); }
.opt .letter { font-weight: 700; color: var(--accent); margin-right: 12px; }

.feedback {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 0.94rem;
}
.feedback.good { background: var(--good-bg); }
.feedback.bad  { background: var(--bad-bg); }
.feedback .point { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

button.next { margin-top: 20px; }

.diff-del { background: #ffd4d8; text-decoration: line-through; border-radius: 4px; padding: 0 3px; }
.diff-ins { background: #c8ecd2; border-radius: 4px; padding: 0 3px; }

/* ── Essay section ──────────────────────────────────────────────────────── */
#e-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.essay-tile {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 22px 24px;
  cursor: pointer;
  text-align: left;
  font-size: 0.97rem;
  font-family: inherit;
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform .12s, box-shadow .12s;
  min-height: 64px;
}
.essay-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.10); }
.essay-tile .num { color: var(--accent); font-weight: 700; margin-right: 10px; }
.essay-tile .done { float: right; color: var(--good); font-size: 0.8rem; font-weight: 600; }

#e-topic { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 16px; }

.essay-so-far {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 18px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.95rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.essay-so-far p { margin-bottom: 9px; }
.essay-so-far p:last-child { color: var(--accent); font-weight: 600; }
.essay-so-far .placeholder { color: var(--muted); font-style: italic; }

.essay-options .opt, .fix-options .opt { font-size: 0.93rem; line-height: 1.5; }

@media (max-width: 740px) {
  .card { padding: 22px; }
  .sentence { font-size: 1.1rem; }
  #e-list { grid-template-columns: 1fr; }
}
