/* 빈칸 채우기 전용 스타일 (styles.css 위에 얹음) */

.back-link {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 600;
}
.back-link:hover { background: #f3f4f6; }

/* 섹션 선택 — 드롭다운 */
.section-select {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 70%;
  cursor: pointer;
}
.section-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* 상세 설정 토글 */
.advanced-toggle {
  align-self: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 4px 8px;
}
.advanced-toggle:hover { color: var(--text); background: transparent; }
.advanced-toggle .caret {
  display: inline-block;
  transition: transform 0.15s;
  font-size: 11px;
}
.advanced-toggle.open .caret { transform: rotate(90deg); }

/* 빈칸 비율 슬라이더 */
.ratio-picker { display: flex; flex-direction: column; gap: 6px; }
.ratio-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.ratio-slider {
  width: 100%;
  accent-color: var(--primary);
  height: 28px;
  cursor: pointer;
}

/* 문장 박스 — 영어(빈칸) + 해석을 한 박스 안에 */
.sentence-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}

.sentence-en {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.9;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sentence-ko {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
}

/* 결과 페이지 — 단원/섹션/비율 뱃지 */
.result-config {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.result-badge {
  font-size: 13px;
  font-weight: 600;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  border-radius: 999px;
  padding: 4px 12px;
  word-break: keep-all;
}

/* 기록 카드 안의 단원/섹션/비율 뱃지 */
.history-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 2px;
}
.history-card-badges .result-badge { font-size: 12px; padding: 3px 10px; }

/* 빈칸 토큰 */
.blank {
  display: inline-block;
  border-radius: 6px;
  padding: 0 4px;
}
.blank.pending {
  color: var(--muted);
  letter-spacing: 1px;
}
.blank.pending.active {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  font-weight: 800;
}
.blank.filled.correct {
  color: var(--correct);
  background: var(--correct-bg);
}
.blank.filled.wrong {
  color: var(--wrong);
  background: var(--wrong-bg);
}
.blank.filled s {
  color: var(--correct);
  text-decoration: none;
  font-weight: 700;
  margin-left: 2px;
}

/* 보기 글자는 가운데 정렬(단어형) */
#screen-quiz .choice { text-transform: none; }
