/* ===== Trang 600 từ TOEIC (tu-vung-600.html) — theo template trang kỹ năng: viền mực 2px, bóng cứng, màu tím của Từ vựng ===== */
.v6 { --v6-ink: #121212; --v6-card: #FFFDF8; --v6-soft: #ECE5F5; --v6-mid: #CFC2E6; --v6-dark: #6E5C92; }
.v6 main { padding-bottom: 80px; }
.v6 [hidden] { display: none !important; }

/* tiến độ chung */
.v6-progress { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 14px 18px; background: var(--v6-card); border: 2px solid var(--v6-ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--v6-ink); font-size: 14px; font-weight: 700; color: var(--v6-ink); }
.v6-progress .bar { flex: 1; height: 10px; background: var(--v6-soft); border: 1.5px solid var(--v6-ink); border-radius: 999px; overflow: hidden; }
.v6-progress .bar i { display: block; height: 100%; background: var(--v6-dark); }
.v6-progress a { color: var(--v6-ink); text-underline-offset: 3px; white-space: nowrap; }

.v6-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.v6-search { display: flex; align-items: center; gap: 8px; width: min(380px, 100%); height: 46px; padding: 0 14px; background: var(--v6-card); border: 2px solid var(--v6-ink); border-radius: 12px; }
.v6-search svg { width: 18px; height: 18px; flex: none; }
.v6-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 15px "Quicksand", sans-serif; color: var(--v6-ink); }
.v6-search:focus-within { box-shadow: 3px 3px 0 var(--v6-ink); }

/* lưới 50 bài */
.v6-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.v6-ext { grid-column: 1 / -1; margin: 18px 0 2px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--v6-dark); }
.v6-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 16px 16px 14px; background: var(--v6-card); color: var(--v6-ink); border: 2px solid var(--v6-ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--v6-ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.v6-card:hover, .v6-card:focus-visible { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--v6-ink); }
.v6-card .n { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--v6-dark); }
.v6-card b { font-family: "Fraunces", serif; font-weight: 800; font-variation-settings: "SOFT" 100; font-size: 19px; line-height: 1.15; letter-spacing: -.01em; }
.v6-card small { font-size: 12.5px; font-weight: 600; color: rgba(18, 18, 18, .62); }
.v6-card .meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.v6-card .meta .bar { flex: 1; height: 6px; background: var(--v6-soft); border-radius: 999px; overflow: hidden; }
.v6-card .meta .bar i { display: block; height: 100%; background: var(--v6-dark); }
.v6-card.done { background: var(--v6-soft); }
.v6-card .score { padding: 2px 7px; border: 1.5px solid var(--v6-ink); border-radius: 999px; background: var(--v6-card); font-size: 11px; }

/* kết quả tìm kiếm */
.v6-results { display: grid; gap: 8px; margin-bottom: 26px; }
.v6-results a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 12px 16px; background: var(--v6-card); color: var(--v6-ink); border: 2px solid var(--v6-ink); border-radius: 12px; text-decoration: none; }
.v6-results a:hover { background: var(--v6-soft); }
.v6-results a b { font-size: 17px; }
.v6-results a span { font-size: 14px; color: rgba(18, 18, 18, .75); }
.v6-results a em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--v6-dark); }
.v6-results p { font-size: 14px; font-weight: 600; }

/* đầu trang bài học */
.v6-lhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 18px; }
.v6-lhead h1.sp-sec-title { margin-top: 12px; font-size: clamp(32px, 4.4vw, 52px); }
.v6-lsub { margin-top: 6px; font-size: 15px; font-weight: 600; color: rgba(18, 18, 18, .66); }
.v6-accent, .v6-tabs { display: inline-flex; padding: 3px; gap: 3px; background: var(--v6-card); border: 2px solid var(--v6-ink); border-radius: 12px; }
.v6-accent button, .v6-tabs button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font: 700 14px "Quicksand", sans-serif; color: var(--v6-ink); cursor: pointer; }
.v6-accent button[aria-pressed="true"], .v6-tabs button[aria-selected="true"] { background: var(--pk, #AE9BCF); box-shadow: inset 0 0 0 1.5px var(--v6-ink); }
.v6-tabs { display: flex; width: fit-content; margin: 26px 0 22px; }
.v6-tabs button { min-height: 42px; padding: 0 20px; font-size: 15px; }

/* nút loa */
.v6-say { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; background: var(--pk, #AE9BCF); color: var(--v6-ink); border: 2px solid var(--v6-ink); border-radius: 50%; cursor: pointer; }
.v6-say svg { width: 17px; height: 17px; }
.v6-say.sm { width: 30px; height: 30px; background: var(--v6-card); }
.v6-say.sm svg { width: 14px; height: 14px; }
.v6-say.playing { background: var(--v6-ink); color: #fff; }

/* danh sách từ */
.v6-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.v6-word { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; background: var(--v6-card); border: 2px solid var(--v6-ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--v6-ink); color: var(--v6-ink); }
.v6-word.known { background: var(--v6-soft); }
.v6-word .top { display: flex; align-items: center; gap: 10px; }
.v6-word .top h3 { font-family: "Plus Jakarta Sans", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.v6-pos { padding: 3px 8px; border: 1.5px solid var(--v6-ink); border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.v6-word .ipa { font-family: "Segoe UI", "Lucida Sans Unicode", "Arial Unicode MS", sans-serif; font-size: 15px; color: rgba(18, 18, 18, .72); }
.v6-word .mean { font-size: 17px; font-weight: 700; }
.v6-ex { display: flex; gap: 10px; padding-top: 10px; border-top: 1.5px dashed rgba(18, 18, 18, .25); }
.v6-ex p { font-size: 15px; line-height: 1.5; font-weight: 600; }
.v6 mark { background: var(--v6-mid); color: inherit; padding: 0 2px; border-radius: 3px; }
.v6-ex small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; font-weight: 500; color: rgba(18, 18, 18, .66); }
.v6-known { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font-size: 13px; font-weight: 700; cursor: pointer; }
.v6-known input { width: 18px; height: 18px; accent-color: var(--v6-dark); }
.v6-hide-tr .v6-ex small { display: none; }
.v6-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; font-size: 14px; font-weight: 700; }
.v6-tools label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.v6-tools input { width: 18px; height: 18px; accent-color: var(--v6-dark); }

/* thẻ ghi nhớ */
.v6-flash { max-width: 640px; margin: 0 auto; }
.v6-flash .count { margin-bottom: 10px; text-align: center; font-size: 14px; font-weight: 700; }
.v6-fc { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 300px; padding: 28px; background: var(--v6-card); color: var(--v6-ink); border: 2px solid var(--v6-ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--v6-ink); text-align: center; cursor: pointer; font: inherit; }
.v6-fc.back { background: var(--v6-soft); }
.v6-fc .big { font-family: "Plus Jakarta Sans", sans-serif; font-size: clamp(34px, 6vw, 48px); font-weight: 800; letter-spacing: -.02em; }
.v6-fc .ipa { font-family: "Segoe UI", "Lucida Sans Unicode", sans-serif; font-size: 18px; color: rgba(18, 18, 18, .7); }
.v6-fc .mean { font-size: 24px; font-weight: 800; }
.v6-fc .ex { max-width: 480px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.v6-fc .tr { max-width: 480px; font-size: 15px; line-height: 1.5; color: rgba(18, 18, 18, .66); }
.v6-fc .hint { position: absolute; bottom: 12px; font-size: 12px; font-weight: 700; color: rgba(18, 18, 18, .5); }
.v6-fc-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.v6-fc-actions .sp-btn { min-width: 150px; justify-content: center; }

/* kiểm tra */
.v6-quiz { max-width: 720px; margin: 0 auto; }
.v6-quiz .count { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.v6-q { padding: 26px; background: var(--v6-card); border: 2px solid var(--v6-ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--v6-ink); color: var(--v6-ink); }
.v6-q .kind { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--v6-dark); }
.v6-q .prompt { display: flex; align-items: center; gap: 12px; margin: 10px 0 20px; font-size: 22px; line-height: 1.4; font-weight: 700; }
.v6-q .prompt.big { font-family: "Plus Jakarta Sans", sans-serif; font-size: 32px; font-weight: 800; }
.v6-q .prompt .gap { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--v6-ink); }
.v6-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v6-opts button { min-height: 52px; padding: 10px 14px; background: var(--v6-card); color: var(--v6-ink); border: 2px solid var(--v6-ink); border-radius: 12px; font: 700 16px "Quicksand", sans-serif; text-align: left; cursor: pointer; }
.v6-opts button:hover:not(:disabled) { background: var(--v6-soft); }
.v6-opts button.right { background: #DBE7D2; box-shadow: inset 0 0 0 2px #3E6B34; }
.v6-opts button.wrong { background: #F6D4C4; text-decoration: line-through; }
.v6-opts button:disabled { cursor: default; }
.v6-fb { min-height: 24px; margin-top: 16px; font-size: 15px; font-weight: 700; }
.v6-q .next { margin-top: 12px; }
.v6-result { padding: 34px 28px; background: var(--v6-card); border: 2px solid var(--v6-ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--v6-ink); text-align: center; color: var(--v6-ink); }
.v6-result .big { font-family: "Fraunces", serif; font-weight: 800; font-size: 60px; line-height: 1; }
.v6-result p { margin: 10px 0 18px; font-size: 16px; font-weight: 600; }
.v6-result ul { display: grid; gap: 6px; max-width: 460px; margin: 0 auto 20px; padding: 0; list-style: none; text-align: left; font-size: 15px; }
.v6-result .sp-actions { justify-content: center; }

.v6-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 40px; }
.v6-pager .sp-btn { flex: 1 1 0; justify-content: center; text-align: center; }
.v6-pager .sp-btn.off { visibility: hidden; }

@media (max-width: 760px) {
  .v6-list { grid-template-columns: 1fr; }
  .v6-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .v6-card { min-height: 120px; padding: 12px; }
  .v6-card b { font-size: 16px; }
  .v6-opts { grid-template-columns: 1fr; }
  .v6-tabs { width: 100%; }
  .v6-tabs button { flex: 1; padding: 0 8px; font-size: 14px; }
  .v6-q { padding: 20px 16px; }
  .v6-q .prompt { font-size: 19px; }
  .v6-pager { flex-direction: column; }
}

/* giao diện tối */
html[data-theme="dark"] .v6 { --v6-ink: #F2EBDD; --v6-card: #24211D; --v6-soft: #332C3F; --v6-mid: #4E4366; --v6-dark: #CFC2E6; }
html[data-theme="dark"] .v6 :is(.v6-card small, .v6-results a span, .v6-lsub, .v6-word .ipa, .v6-ex small, .v6-fc .ipa, .v6-fc .tr, .v6-fc .hint) { color: rgba(242, 235, 221, .7); }
html[data-theme="dark"] .v6 :is(.v6-say, .v6-accent button[aria-pressed="true"], .v6-tabs button[aria-selected="true"]) { color: #121212; }
html[data-theme="dark"] .v6 .v6-say.sm { color: var(--v6-ink); }
html[data-theme="dark"] .v6 .v6-opts button.right { background: #2F4A2A; }
html[data-theme="dark"] .v6 .v6-opts button.wrong { background: #5A2E25; }

/* điện thoại: nút loa nhỏ vẫn có vùng chạm ~44px (hình giữ nguyên) */
@media (pointer: coarse), (max-width: 640px) {
  .v6-say { position: relative; }
  .v6-say::after { content: ""; position: absolute; inset: -4px; }
  .v6-say.sm::after { inset: -7px; }
}
