:root {
  --primary: #2b6cb0;
  --bg: #f7f9fc;
  --card: #ffffff;
  --text: #1a202c;
  --muted: #718096;
  --good: #2f855a;
  --bad: #c53030;
  --border: #e2e8f0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--primary);
  color: white;
}
.app-header h1 { font-size: 18px; margin: 0; }
.app-header select {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
}
.tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.tab-btn {
  flex: 1;
  padding: 14px 0;
  background: none;
  border: none;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 28px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-align: center;
}
.category-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  background: #ebf4ff;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.word-jp {
  font-size: 32px;
  font-weight: 700;
  margin: 8px 0;
}
.word-reading {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 12px;
}
.word-meaning {
  font-size: 20px;
  margin: 14px 0;
  min-height: 28px;
}
.example {
  font-size: 14px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.6;
}
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
button.primary {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  cursor: pointer;
}
button.outline {
  flex: 1;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}
button.correct { background: var(--good); color: white; border: none; }
button.wrong { background: var(--bad); color: white; border: none; }
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--muted); margin-top: 4px; }
textarea.answer-box {
  width: 100%;
  min-height: 70px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 16px;
  margin-top: 12px;
  resize: vertical;
}
.prompt-ko { font-size: 18px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.answer-reveal {
  margin-top: 14px;
  padding: 12px;
  background: #ebf8ff;
  border-radius: 10px;
  font-size: 16px;
  text-align: left;
}
