/* 학습자료 국어 어휘: 카드와 뜻 고르기 */

.vc-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; }
.vc-filter__actions { display: flex; gap: 8px; margin-left: auto; }

.vc-stage { max-width: 720px; margin: 0 auto; }
.vc-empty { padding: 48px 0; text-align: center; color: var(--color-text-muted); }

.vc-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vc-progress__n { flex: none; min-width: 64px; font-size: 14px; font-weight: 700; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.vc-progress__bar { flex: 1; height: 6px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.vc-progress__bar i { display: block; height: 100%; border-radius: 999px; background: var(--color-accent); transition: width .2s ease; }

.vc-word { font-size: 40px; font-weight: 800; line-height: 1.2; color: var(--color-primary); letter-spacing: -0.01em; word-break: keep-all; }
.vc-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--color-text-muted); }
.vc-hanja { font-size: 15px; color: var(--color-accent-text); }

/* 카드 */
.vc-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 300px; padding: 32px 28px;
  border: 1px solid var(--color-border); border-radius: 16px;
  background: #fff; box-shadow: 0 6px 20px rgba(17, 26, 51, 0.07);
  font: inherit; color: var(--color-text); text-align: center; cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}
.vc-card:hover { box-shadow: 0 10px 26px rgba(17, 26, 51, 0.11); }
.vc-card__front { display: flex; flex-direction: column; align-items: center; }
.vc-card__hint { margin-top: 26px; padding: 6px 14px; border-radius: 999px; background: #eef1f6; font-size: 14px; font-weight: 600; color: var(--color-primary); }
.vc-card.is-flipped { background: #fbfcfe; cursor: pointer; }
.vc-card.is-flipped .vc-card__front { display: none; }
.vc-card__back { display: flex; flex-direction: column; align-items: center; width: 100%; }
.vc-card__back .vc-word { font-size: 30px; }

.vc-senses { width: 100%; margin: 22px 0 0; padding: 18px 0 0 1.4em; border-top: 1px solid var(--color-border); text-align: left; font-size: 18px; line-height: 1.65; }
.vc-senses li + li { margin-top: 8px; }
.vc-senses li::marker { color: var(--color-text-muted); font-weight: 600; }

.vc-example { width: 100%; margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: #f4f6fa; font-size: 16.5px; line-height: 1.6; text-align: left; }
.vc-example mark { padding: 0 2px; border-radius: 3px; background: var(--color-accent-soft); color: inherit; font-weight: 700; }
.vc-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.vc-actions .btn { min-width: 128px; height: 46px; font-size: 16px; }

/* 뜻 고르기 */
.vc-quiz__q { padding: 28px 16px 24px; text-align: center; }
.vc-opts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.vc-opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 16px;
  border: 1px solid var(--color-border); border-radius: 12px; background: #fff;
  font: inherit; font-size: 16.5px; line-height: 1.55; color: var(--color-text); text-align: left; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.vc-opt:hover:not(:disabled) { border-color: var(--color-primary-light); background: #f7f9fc; }
.vc-opt:disabled { cursor: default; }
.vc-opt__no { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: #eef1f6; font-size: 13px; font-weight: 700; color: var(--color-primary); }
.vc-opt.is-right { border-color: #1d6b43; background: #e9f6ee; }
.vc-opt.is-right .vc-opt__no { background: #1d6b43; color: #fff; }
.vc-opt.is-wrong { border-color: #c0392b; background: #fdeeec; }
.vc-opt.is-wrong .vc-opt__no { background: #c0392b; color: #fff; }
.vc-after { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.vc-next { min-width: 128px; height: 46px; margin-left: auto; font-size: 16px; }

/* 빈칸 채우기 */
.vc-quiz__q--blank { padding: 28px 8px 22px; text-align: left; }
.vc-sentence { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.7; color: var(--color-text); word-break: keep-all; }
.vc-sentence mark { padding: 0 3px; border-radius: 4px; background: var(--color-accent-soft); color: var(--color-primary); font-weight: 800; }
.vc-blank { display: inline-block; width: 5.5em; height: 1.1em; margin: 0 4px; border-bottom: 2px solid var(--color-primary); vertical-align: -3px; }
.vc-quiz__mean { margin: 12px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--color-text-muted); }
.vc-quiz__mean b { margin-right: 6px; color: var(--color-primary); }
.vc-opts--words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vc-opts--words .vc-opt { align-items: center; font-size: 18px; font-weight: 600; }

/* 결과 */
.vc-end { text-align: center; }
.vc-score { padding-top: 16px; color: var(--color-primary); }
.vc-score b { font-size: 56px; font-weight: 800; }
.vc-score span { font-size: 24px; font-weight: 600; color: var(--color-text-muted); }
.vc-score__label { margin: 2px 0 0; font-size: 14px; color: var(--color-text-muted); }
.vc-end__title { margin: 28px 0 8px; font-size: 17px; font-weight: 800; text-align: left; }
.vc-review { margin: 0; padding: 0; list-style: none; text-align: left; border-top: 1px solid var(--color-border); }
.vc-review li { display: grid; grid-template-columns: minmax(96px, 28%) 1fr; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--color-border); }
.vc-review__w { font-size: 17px; font-weight: 700; color: var(--color-primary); word-break: keep-all; }
.vc-review__s { font-size: 15.5px; line-height: 1.6; }

.vc-source { max-width: 720px; margin: 40px auto 0; font-size: 12.5px; color: var(--color-text-muted); text-align: center; }
.vc-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
  .vc-filter { gap: 8px; }
  .vc-filter__actions { margin-left: 0; }
  .vc-preview__bar { padding: 0 8px 0 14px; }
  .vc-word { font-size: 34px; }
  .vc-card { min-height: 260px; padding: 24px 18px; }
  .vc-senses { font-size: 17px; }
  .vc-actions .btn { flex: 1; min-width: 0; }
  .vc-review li { grid-template-columns: 1fr; gap: 4px; }
  .vc-sentence { font-size: 19px; }
}

/* 전체 목록 */
.vc-list__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.vc-list__q { flex: 1; min-width: 0; }
.vc-list__n { flex: none; font-size: 14px; font-weight: 700; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.vc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-border); }
.vc-row { padding: 14px 4px; border-bottom: 1px solid var(--color-divider); }
.vc-row__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.vc-row__w { font-size: 18px; font-weight: 800; color: var(--color-text-strong); }
.vc-row__p { font-size: 13px; color: var(--color-text-muted); }
.vc-row__s { margin: 6px 0 0; padding-left: 0; font-size: 15px; line-height: 1.6; color: var(--color-text); }
ol.vc-row__s { padding-left: 20px; }
@media (max-width: 640px) { .vc-list__q { height: 44px; font-size: 16px; } }

/* ---------- 시험지 (A4) ---------- */

.vs-b { padding: 4.2mm 0 3.4mm; border-bottom: 1px solid #e3e3e3; break-inside: avoid; }
.vs-b__s { display: flex; align-items: baseline; gap: 8px; font-size: 15.5px; line-height: 1.7; }
.vs-blank { display: inline-block; width: 7em; margin: 0 3px; border-bottom: 1.2px solid #171717; vertical-align: -2px; }
.vs-b__opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 10px; margin: 6px 0 0 30px; padding: 0; list-style: none; font-size: 14px; }
.vs-b__opts li { display: flex; gap: 5px; }
.vs-b__opts li span { flex: none; }

.vc-preview { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #e8e8e8; }
.vc-preview[hidden] { display: none; }
body.is-previewing { overflow: hidden; }
.vc-preview__bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px; flex: none; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.vc-preview__title { font-size: 15px; }
.vc-preview__pages { font-size: 13px; color: var(--color-text-muted); }
.vc-preview__actions { display: flex; gap: 8px; margin-left: auto; }
.vc-print { flex: 1; overflow: auto; padding: 24px 12px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.vc-print .vs-a4 { zoom: var(--zoom, 1); flex: none; box-shadow: 0 2px 10px rgba(40, 30, 15, 0.18); }

.vs-a4 { width: 210mm; height: 297mm; padding: 14mm 15mm 12mm; overflow: hidden; background: #fff; color: #171717; font-size: 14px; line-height: 1.5; break-after: page; }
.vs-a4:last-child { break-after: auto; }
.vs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1.5px solid #171717; }
.vs-head__title { font-size: 18px; font-weight: 700; }
.vs-head__grade { margin-right: 8px; color: var(--color-primary); }
.vs-head__fields { display: flex; gap: 18px; font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }
.vs-head__fields span::after { content: ""; display: inline-block; width: 60px; margin-left: 6px; border-bottom: 1px solid var(--color-border-strong); }

.vs-list { margin: 0; padding: 0; list-style: none; }
.vs-q { padding: 3.4mm 0 3mm; border-bottom: 1px solid #e3e3e3; break-inside: avoid; }
.vs-q__w { display: flex; align-items: baseline; gap: 8px; font-size: 16px; font-weight: 700; }
.vs-no { flex: none; min-width: 22px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.vs-pos { font-size: 11.5px; font-weight: 500; color: var(--color-text-muted); }
.vs-q__opts { margin: 5px 0 0 30px; padding: 0; list-style: none; font-size: 13px; line-height: 1.5; }
.vs-q__opts li { display: flex; gap: 6px; padding: 1px 0; }
.vs-q__opts li span { flex: none; }

.vs-list--write { display: grid; grid-template-columns: 1fr; }
.vs-w { display: grid; grid-template-columns: 44mm 1fr; align-items: end; gap: 6mm; padding: 5mm 0 2.6mm; break-inside: avoid; }
.vs-line { height: 9mm; border-bottom: 1px solid #9a9a9a; }

.vs-key__title { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1.5px solid #171717; font-size: 16px; font-weight: 700; }
.vs-key { margin: 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.5; }
.vs-key li { display: flex; gap: 6px; padding: 4px 0; border-bottom: 1px solid #ececec; }
.vs-key b { flex: none; font-weight: 700; }

@media print {
  body.is-previewing > .topbar, body.is-previewing .sidebar, body.is-previewing .page-header,
  body.is-previewing .vc-filter, body.is-previewing .vc-stage, body.is-previewing .vc-source, .vc-preview__bar { display: none !important; }
  body.is-previewing { background: #fff; overflow: visible; }
  body.is-previewing > .shell { display: block !important; min-height: 0; }
  body.is-previewing .main { padding: 0; }
  .vc-preview { position: static; display: block; background: #fff; }
  .vc-print { display: block; overflow: visible; padding: 0; }
  .vc-print .vs-a4 { zoom: 1; box-shadow: none; }
}
@page { size: A4; margin: 0; }
