.vocabulary-page { --vocab-blue: #315edb; --vocab-teal: #078572; --vocab-soft: #edf3ff; color: var(--ink, #18243d); padding-bottom: 34px; }
.vocabulary-page *, .vocabulary-page *::before, .vocabulary-page *::after { box-sizing: border-box; }
.vocabulary-page [hidden] { display: none !important; }
.vocabulary-page a { color: var(--vocab-blue); }
.vocabulary-page :is(a, button, input, select):focus-visible { outline: 3px solid #91b5ff; outline-offset: 3px; }
.vocabulary-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 8px 0 30px; }
.vocabulary-kicker { color: var(--vocab-teal); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.vocabulary-hero h1 { margin: 10px 0; font-size: clamp(27px, 3.6vw, 38px); line-height: 1.2; letter-spacing: -.035em; }
.vocabulary-hero p { margin: 0; color: var(--muted, #64718a); line-height: 1.7; }
.vocabulary-backlinks { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.vocabulary-backlinks a { padding: 10px 14px; border: 1px solid var(--line, #e3e9f3); border-radius: 11px; background: var(--surface, #fff); font-size: 13px; font-weight: 700; text-decoration: none; }
.vocabulary-grade-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.vocabulary-grade-card { position: relative; isolation: isolate; display: flex; min-width: 0; min-height: 280px; flex-direction: column; padding: 29px; overflow: hidden; border: 1px solid #dae5f5; border-radius: 23px; background: linear-gradient(145deg, #fff 30%, #edf3ff); color: var(--ink, #18243d) !important; text-decoration: none; box-shadow: 0 10px 32px #1d336909; transition: transform .18s, box-shadow .18s, border-color .18s; }
.vocabulary-grade-card:nth-child(2) { background: linear-gradient(145deg, #fff 30%, #e8f7f1); }
.vocabulary-grade-card:nth-child(3) { background: linear-gradient(145deg, #fff 30%, #f1edff); }
.vocabulary-grade-card:hover { transform: translateY(-4px); border-color: #a8c0ef; box-shadow: 0 16px 35px #1d336914; }
.vocabulary-grade-number { position: absolute; right: 9px; bottom: 10px; z-index: -1; font-size: 130px; font-weight: 900; letter-spacing: -.09em; line-height: 1; opacity: .055; }
.vocabulary-grade-card h2 { margin: 28px 0 10px; font-size: 30px; }
.vocabulary-grade-card p { margin: 0 0 36px; color: var(--muted, #64718a); font-size: 14px; }
.vocabulary-card-link { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: auto; color: var(--vocab-blue); font-size: 14px; font-weight: 750; }
.vocabulary-catalog-note { margin-top: 23px; color: var(--muted, #64718a); font-size: 13px; line-height: 1.7; }
.vocabulary-search { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 25px; padding: 20px; background: var(--surface, #fff); border: 1px solid var(--line, #e3e9f3); border-radius: 15px; }
.vocabulary-search label { width: 100%; font-size: 13px; font-weight: 700; }
.vocabulary-search input { flex: 1 1 200px; min-width: 0; padding: 12px 15px; border: 1px solid var(--line, #e3e9f3); border-radius: 10px; color: inherit; background: var(--surface, #fff); font: inherit; }
.vocabulary-unit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.vocabulary-unit-card { display: flex; min-width: 0; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line, #e3e9f3); border-radius: 18px; background: var(--surface, #fff); text-decoration: none; box-shadow: 0 5px 20px #1d336905; overflow-wrap: anywhere; }
a.vocabulary-unit-card:hover { border-color: #a8c0ef; box-shadow: 0 10px 25px #1d336912; }
.vocabulary-unit-number { align-self: flex-start; padding: 5px 9px; background: var(--vocab-soft); border-radius: 6px; color: var(--vocab-blue); font-size: 11px; font-weight: 800; }
.vocabulary-unit-card h2 { margin: 5px 0 0; color: var(--ink, #18243d); font-size: 19px; line-height: 1.45; }
.vocabulary-unit-card p { margin: 0; color: var(--muted, #64718a); font-size: 13px; line-height: 1.7; }
.vocabulary-unit-card .vocabulary-unit-topic { color: var(--vocab-teal); font-weight: 700; }
.vocabulary-unit-card .vocabulary-card-link { padding-top: 15px; font-size: 12px; }
.vocabulary-empty, .vocabulary-error { padding: 46px 25px; border: 1px solid var(--line, #e3e9f3); border-radius: 18px; background: var(--surface, #fff); text-align: center; line-height: 1.7; }
.vocabulary-empty > span { display: block; margin-bottom: 12px; color: #b1c5e7; font-size: 50px; font-weight: 800; }
.vocabulary-empty h2, .vocabulary-error h2 { margin: 0 0 10px; font-size: 21px; }
.vocabulary-empty p, .vocabulary-error p { max-width: 580px; margin: 0 auto 18px; color: var(--muted, #64718a); }
.vocabulary-error { border-color: #ecc7bd; }
.vocabulary-app { min-width: 0; }
.vocab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.vocab-unit-heading h2 { margin: 5px 0 0; font-size: 19px; line-height: 1.4; }
.vocab-tabs { display: flex; flex-shrink: 0; gap: 5px; padding: 5px; border: 1px solid var(--line, #e3e9f3); border-radius: 13px; background: #eef2f8; }
.vocab-mode { padding: 10px 15px; border: 0; border-radius: 9px; color: #68768e; background: transparent; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.vocab-mode[aria-pressed="true"] { color: var(--vocab-teal); background: #fff; box-shadow: 0 2px 7px #1d336911; }
.vocab-progress-panel { margin-bottom: 18px; padding: 21px 24px; border: 1px solid var(--line, #e3e9f3); border-radius: 17px; background: var(--surface, #fff); }
.vocab-progress-heading { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 12px; font-size: 13px; }
.vocab-progress-heading > span { color: var(--vocab-teal); font-weight: 750; }
.vocab-progress-bar { height: 7px; overflow: hidden; border-radius: 5px; background: #e9eef5; }
.vocab-progress-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #50c69c, #078572); transition: width .2s; }
.vocab-progress-legend { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 14px; color: var(--muted, #64718a); font-size: 11px; }
.vocab-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.vocab-dot { width: 8px; height: 8px; border-radius: 3px; background: #c5cedb; }
.vocab-dot.status-learning { background: #ef9c43; }
.vocab-dot.status-learned { background: #72d7ad; }
.vocab-dot.status-remembered { background: #078572; }
.vocab-account-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line, #e3e9f3); color: var(--muted, #64718a); font-size: 12px; }
.vocab-filters { display: flex; gap: 15px; align-items: end; margin-bottom: 16px; }
.vocab-filters label { display: grid; gap: 7px; color: var(--muted, #64718a); font-size: 11px; font-weight: 650; }
.vocab-search-label { flex: 1; }
.vocab-input { width: 100%; min-width: 0; padding: 10px 13px; border: 1px solid var(--line, #e3e9f3); border-radius: 10px; color: var(--ink, #18243d); background: var(--surface, #fff); font: inherit; font-size: 13px; }
.vocab-filter-count { flex-shrink: 0; margin: 0 0 11px auto; color: var(--muted, #64718a); font-size: 11px; }
.vocab-message { margin: 0; color: var(--vocab-teal); font-size: 12px; line-height: 1.6; }
.vocab-message:not(:empty) { margin: 10px 0 17px; padding: 10px 14px; border: 1px solid #c2e4d9; border-radius: 9px; background: #effaf5; }
.vocab-message.is-error { color: #ae3e32; background: #fff3ed; border-color: #efd0c6; }
.vocab-word-grid { display: grid; gap: 19px; }
.vocab-word-card { position: relative; min-width: 0; padding: 24px 27px 22px; overflow: hidden; border: 1px solid #dce5f1; border-radius: 18px; background: linear-gradient(120deg, var(--surface, #fff), #f8fbff); box-shadow: 0 4px 14px #1d336906; }
.vocab-word-card::before { content: ""; position: absolute; top: 23px; bottom: 23px; left: 0; width: 4px; border-radius: 0 3px 3px 0; background: #315edb; }
.vocab-word-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 21px; }
.vocab-word-number { display: grid; flex-shrink: 0; width: 41px; height: 41px; place-items: center; border: 1px solid #d6e2f6; border-radius: 11px; color: #47669c; background: #edf3ff; font-size: 14px; font-weight: 750; }
.vocab-word-title { min-width: 0; }
.vocab-word-title h3 { margin: 0 0 5px; font-size: clamp(21px, 2.3vw, 26px); line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.vocab-word-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vocab-pos { display: inline-block; color: #315edb; background: #edf3ff; border: 1px solid #dce6fa; border-radius: 5px; padding: 2px 7px; font-size: 11px; font-weight: 600; line-height: 1.4; }
.vocab-ipa { color: #7183a4; font-size: 13px; }
.vocab-pronounce { display: grid; width: 36px; height: 36px; flex-shrink: 0; place-items: center; border: 1px solid var(--line, #e3e9f3); border-radius: 10px; color: #6f8db8; background: var(--surface, #fff); cursor: pointer; font-size: 13px; }
.vocab-pronounce:hover:not(:disabled) { border-color: #8caee8; color: #315edb; }
.vocab-word-position { margin-left: auto; color: #8a99af; font-size: 11px; white-space: nowrap; }
.vocab-label { color: var(--vocab-teal); font-size: 10px; font-weight: 800; letter-spacing: .045em; }
.vocab-meaning { display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.vocab-meaning p { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-line; }
.vocab-examples { display: grid; gap: 8px; margin: 10px 0 17px; }
.vocab-example-pair p { margin: 0; line-height: 1.75; font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.vocab-example-en { color: #465979; }
.vocab-example-en strong { color: #233c68; font-weight: 800; }
.vocab-example-pair .vocab-example-vi { margin-top: 3px; color: #8492aa; font-style: italic; font-size: 13px; }
.vocab-related { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.vocab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vocab-chip { padding: 3px 9px; border: 1px solid #e1e7f0; border-radius: 6px; color: #59708e; background: #f5f8fc; font-size: 12px; }
.vocab-related.antonyms .vocab-label { color: #b76b32; }
.vocab-related.antonyms .vocab-chip { color: #ad6c3d; border-color: #f2decb; background: #fff8ef; }
.vocab-word-footer { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line, #e3e9f3); }
.vocab-word-footer-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 9px; }
.vocab-word-footer-heading > .vocab-label { color: #8a99af; }
.vocab-status { display: inline-block; padding: 4px 9px; border-radius: 6px; color: #8090a8; background: #edf1f7; font-size: 10px; font-weight: 700; white-space: nowrap; }
.vocab-status.status-learning { color: #b47526; background: #fff3e1; }
.vocab-status.status-learned { color: #249d75; background: #eaf9f1; }
.vocab-status.status-remembered { color: #067863; background: #dff5eb; }
.vocab-state-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.vocab-state-button { flex: 1 1 95px; padding: 9px 11px; border: 1px solid #e1e7f0; border-radius: 8px; color: #7b89a0; background: #fff; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.vocab-state-button[aria-pressed="true"] { border-color: #9ed7c5; color: #078572; background: #edf9f3; }
.vocabulary-page button:disabled { cursor: default; opacity: .48; }
.vocab-word-list { display: grid; gap: 9px; }
.vocab-list-row { display: grid; grid-template-columns: 25px minmax(130px, 1fr) minmax(130px, 1.2fr) auto; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line, #e3e9f3); border-radius: 12px; background: var(--surface, #fff); }
.vocab-list-number { color: #9aa7bb; font-size: 11px; }
.vocab-list-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.vocab-list-term { padding: 0; border: 0; color: var(--ink, #18243d); background: transparent; text-align: left; font: inherit; font-size: 15px; font-weight: 750; overflow-wrap: anywhere; cursor: pointer; }
.vocab-list-term:hover { color: #315edb; text-decoration: underline; }
.vocab-list-meaning { margin: 0; color: #64718a; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.vocab-state-actions.compact { grid-column: 2 / -1; justify-content: flex-end; }
.vocab-state-actions.compact .vocab-state-button { flex: 0 1 auto; padding: 5px 9px; font-size: 10px; }
.vocab-button { display: inline-block; padding: 11px 17px; border: 1px solid var(--line, #e3e9f3); border-radius: 10px; color: #64718a; background: var(--surface, #fff); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; }
.vocab-button:hover { border-color: #a9bfe8; }
.vocab-button.primary { border-color: #315edb; color: #fff; background: #315edb; box-shadow: 0 5px 12px #315edb19; }
.vocab-button.primary:hover { background: #244cbb; }
.vocab-load-more { display: block; margin: 24px auto 0; }
.vocab-games-intro { padding: 28px 0 23px; text-align: center; }
.vocab-games-intro h3 { margin: 10px 0; font-size: 25px; letter-spacing: -.035em; }
.vocab-games-intro p { max-width: 570px; margin: auto; color: #7a88a1; font-size: 13px; line-height: 1.8; }
.vocab-game-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vocab-game-option { padding: 30px; border: 1px solid var(--line, #e3e9f3); border-radius: 19px; background: var(--surface, #fff); }
.vocab-game-icon { display: grid; width: 47px; height: 47px; place-items: center; border-radius: 13px; color: #315edb; background: #edf3ff; font-size: 15px; font-weight: 800; }
.vocab-game-option:nth-child(2) .vocab-game-icon { color: #078572; background: #e7f7ef; }
.vocab-game-option h4 { margin: 19px 0 9px; font-size: 21px; }
.vocab-game-option p { margin: 0 0 22px; color: #7a88a1; font-size: 13px; line-height: 1.8; }
.vocab-game-option .vocab-game-note { margin: 15px 0 0; color: #b47526; font-size: 11px; }
.vocab-game-panel, .vocab-game-summary { max-width: 760px; margin: 22px auto 0; padding: 30px; border: 1px solid var(--line, #e3e9f3); border-radius: 19px; background: var(--surface, #fff); }
.vocab-game-topline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #8795ac; font-size: 11px; font-weight: 700; }
.vocab-text-button { margin-top: 18px; padding: 0; border: 0; color: #7e90ae; background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.vocab-game-instruction { margin: 25px 0 9px; color: #7a88a1; font-size: 12px; }
.vocab-game-prompt { margin: 0 0 13px; font-size: 30px; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
.vocab-game-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 17px; }
.vocab-game-choice { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 14px; border: 1px solid #dfe6f0; border-radius: 12px; color: #506381; background: #fafcff; text-align: left; font: inherit; font-size: 13px; cursor: pointer; overflow-wrap: anywhere; }
.vocab-game-choice:hover:not(:disabled) { border-color: #8eace1; background: #f0f5ff; }
.vocab-choice-letter { display: grid; flex-shrink: 0; width: 28px; height: 28px; place-items: center; border: 1px solid #dce5f2; border-radius: 8px; color: #8a9bb7; background: #fff; font-size: 11px; font-weight: 800; }
.vocabulary-page .vocab-game-choice:disabled { opacity: .65; }
.vocabulary-page .vocab-game-choice.is-correct { border-color: #80cdb3; color: #067f64; background: #edf9f3; opacity: 1; }
.vocabulary-page .vocab-game-choice.is-wrong { border-color: #e8b7ab; color: #b2523f; background: #fff3ef; opacity: 1; }
.vocab-game-note { margin: 14px 0; color: #8997ad; font-size: 11px; line-height: 1.7; }
.vocab-game-feedback { margin: 17px 0; color: #a56b30; font-size: 13px; line-height: 1.7; }
.vocab-game-feedback:empty { display: none; }
.vocab-game-feedback.is-correct { color: #078572; }
.vocab-game-feedback.is-wrong { color: #b2523f; }
.vocab-game-feedback p { margin: 5px 0; }
.vocab-typing-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 23px; }
.vocab-typing-form label { display: grid; gap: 8px; color: #7a88a1; font-size: 12px; }
.vocab-typing-form input { padding: 12px 14px; font-size: 16px; }
.vocab-game-summary { padding: 42px 28px; text-align: center; }
.vocab-result-score { margin: 22px 0 10px; color: #078572; font-size: 61px; font-weight: 850; letter-spacing: -.055em; }
.vocab-game-summary h3 { margin: 0; font-size: 24px; }
.vocab-result-stats { display: flex; gap: 23px; justify-content: center; margin: 17px 0 25px; color: #7a88a1; font-size: 13px; }
.vocab-game-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
html[data-theme="dark"] .vocabulary-page { --vocab-soft: #243554; --vocab-teal: #68cdb1; }
html[data-theme="dark"] .vocabulary-grade-card { background: linear-gradient(145deg, var(--surface, #1b2942), #223552); border-color: var(--line); }
html[data-theme="dark"] .vocabulary-grade-card:nth-child(2) { background: linear-gradient(145deg, var(--surface, #1b2942), #1d3b38); }
html[data-theme="dark"] .vocabulary-grade-card:nth-child(3) { background: linear-gradient(145deg, var(--surface, #1b2942), #332b4a); }
html[data-theme="dark"] .vocab-tabs { background: #1b2a43; }
html[data-theme="dark"] .vocab-mode[aria-pressed="true"] { background: #273b58; }
html[data-theme="dark"] .vocab-word-card { background: var(--surface, #1b2942); border-color: var(--line); }
html[data-theme="dark"] :is(.vocab-state-button, .vocab-choice-letter) { background: #20314d; border-color: #304564; color: #a2b4ce; }
html[data-theme="dark"] .vocab-game-choice { color: #b0c0d8; background: #20314d; border-color: #304564; }
html[data-theme="dark"] .vocab-example-en, html[data-theme="dark"] .vocab-example-en strong { color: #bdcde4; }
html[data-theme="dark"] .vocab-message:not(:empty) { color: #77d8b7; background: #203d35; border-color: #345c4d; }
html[data-theme="dark"] .vocab-message.is-error { color: #efb5a6; background: #4a302e; border-color: #71473d; }
@media (max-width: 1000px) { .vocabulary-grade-grid { gap: 15px; } .vocabulary-grade-card { padding: 24px; } .vocabulary-unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vocab-toolbar { align-items: flex-start; flex-direction: column; } }
@media (max-width: 640px) {
    .vocabulary-hero { flex-direction: column; align-items: flex-start; margin-bottom: 23px; gap: 16px; }
    .vocabulary-grade-grid, .vocabulary-unit-grid, .vocab-game-options { grid-template-columns: minmax(0, 1fr); }
    .vocabulary-grade-card { min-height: 225px; }
    .vocabulary-grade-card h2 { margin-top: 20px; }
    .vocabulary-grade-card p { margin-bottom: 27px; }
    .vocab-tabs { width: 100%; }
    .vocab-mode { flex: 1; padding: 11px 5px; font-size: 12px; }
    .vocab-toolbar { gap: 15px; }
    .vocab-progress-panel { padding: 18px; }
    .vocab-progress-legend { gap: 10px 14px; }
    .vocab-filters { flex-wrap: wrap; gap: 12px; }
    .vocab-search-label { flex-basis: 100%; }
    .vocab-status-label { flex: 1; }
    .vocab-filter-count { margin-bottom: 12px; }
    .vocab-word-card { padding: 19px 18px; }
    .vocab-word-heading { gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
    .vocab-word-title { flex: 1; }
    .vocab-word-position { flex-basis: 100%; text-align: right; margin-top: -3px; }
    .vocab-word-title h3 { font-size: 22px; }
    .vocab-word-number { width: 34px; height: 36px; font-size: 12px; }
    .vocab-meaning { flex-direction: column; gap: 5px; }
    .vocab-meaning p { font-size: 15px; }
    .vocab-state-button { flex-basis: calc(50% - 7px); }
    .vocab-list-row { grid-template-columns: 20px minmax(0, 1fr) auto; padding: 14px; gap: 9px; }
    .vocab-list-meaning { grid-column: 2 / -1; grid-row: 2; }
    .vocab-state-actions.compact { grid-column: 2 / -1; justify-content: flex-start; }
    .vocab-game-panel, .vocab-game-summary { padding: 23px 18px; }
    .vocab-game-choices { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .vocab-game-choice { min-height: 60px; }
    .vocab-game-prompt { font-size: 25px; }
    .vocab-typing-form { grid-template-columns: minmax(0, 1fr); }
    .vocab-game-option { padding: 25px; }
    .vocab-result-stats { gap: 15px; }
    .vocabulary-search { padding: 17px; }
}
