:root{
  --bg:#0b1220;
  --card:#121a2b;
  --text:#e7eefc;
  --muted:#a8b3cf;
  --border:#24304a;
  --primary:#4f8cff;
  --good:#2ecc71;
  --bad:#ff5a6a;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans JP", sans-serif;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1000px 500px at 20% 0%, #152044 0%, var(--bg) 55%);
  color:var(--text);
}

.header{
  padding:22px 18px 10px;
  text-align:center;
}
.header__title{ margin:0; font-size:22px; }
.header__sub{ margin:6px 0 0; color:var(--muted); font-size:13px; }

.container{ max-width:860px; margin:0 auto; padding:16px; }

.screen{ display:none; }
.screen.is-active{ display:block; }
.screen__title{ margin:8px 0 12px; font-size:18px; }

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
}

.muted{ color:var(--muted); }
.hint{ margin-top:14px; font-size:12px; }

.topRow{ display:flex; justify-content:space-between; align-items:center; gap:12px; }

.pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
}

.meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}

.question__label{ margin:0 0 8px; color:var(--muted); font-size:13px; }
.term{
  font-family:var(--mono);
  font-size:30px;
  padding:10px 12px;
  border:1px dashed var(--border);
  border-radius:12px;
  background:rgba(0,0,0,.2);
}

.choices{
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.btn{
  appearance:none;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  transition:transform .04s ease, background .15s ease, border-color .15s ease;
}
.btn:active{ transform:translateY(1px); }
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.btn--primary{
  background:rgba(79,140,255,.18);
  border-color:rgba(79,140,255,.55);
}
.btn--ghost{
  background:transparent;
}

.choiceBtn{
  text-align:left;
}

.choiceBtn.is-correct{
  border-color:rgba(46,204,113,.9);
  background:rgba(46,204,113,.14);
}
.choiceBtn.is-wrong{
  border-color:rgba(255,90,106,.9);
  background:rgba(255,90,106,.12);
}

.feedback{
  margin-top:12px;
  min-height:20px;
  font-size:14px;
}
.feedback.is-good{ color:var(--good); }
.feedback.is-bad{ color:var(--bad); }

.actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.actions--split{
  justify-content:flex-end;
}

.categoryButtons{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:12px;
}

.resultSummary{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.resultScore{
  font-family:var(--mono);
  font-size:26px;
  font-weight:700;
}

.wrongBox{
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:rgba(0,0,0,.18);
}
.wrongList{
  margin-top:10px;
  display:grid;
  gap:10px;
}
.wrongItem{
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
}
.wrongItem__term{ font-family:var(--mono); font-size:16px; }
.wrongItem__answer{ margin-top:6px; color:var(--text); }
.wrongItem__note{ margin-top:6px; color:var(--muted); font-size:12px; }

.learningCards{
  display:grid;
  gap:12px;
  margin:14px 0 4px;
}
.learningCard{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(0,0,0,.18);
}
.learningCard__head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.learningCard__num{
  font-size:12px;
  color:var(--muted);
  font-family:var(--mono);
}
.learningCard__term{
  font-family:var(--mono);
  font-size:16px;
  font-weight:700;
}
.learningCard__status{
  margin-left:auto;
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid var(--border);
}
.learningCard__status.is-ok{
  color:var(--good);
  border-color:rgba(46,204,113,.5);
}
.learningCard__status.is-warn{
  color:var(--bad);
  border-color:rgba(255,90,106,.5);
}
.learningCard__body{
  margin:0;
  font-size:13px;
  line-height:1.6;
  color:var(--text);
}

.exampleCards{
  display:grid;
  gap:12px;
  margin:14px 0 4px;
}
.exampleCard{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(0,0,0,.18);
}
.exampleCard__head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
}
.exampleCard__num{
  font-size:12px;
  color:var(--muted);
  font-family:var(--mono);
}
.exampleCard__term{
  font-family:var(--mono);
  font-size:16px;
  font-weight:700;
}
.exampleCard__label{
  margin:0 0 6px;
  font-size:12px;
}
.exampleCard__code{
  font-family:var(--mono);
  font-size:14px;
  line-height:1.7;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(0,0,0,.25);
  border:1px dashed var(--border);
  overflow-x:auto;
}
.exampleHighlight{
  color:var(--bad);
  font-weight:700;
}
.exampleArrow{
  color:var(--muted);
}

.footer{ text-align:center; padding:18px 0 26px; }