/* KCV (New Academic Word List) uses the same Just Voca shared design as NGSL/HSK. */
.main-content { width: min(1500px, calc(100% - 32px)); margin: 16px auto 40px; }
.table-wrap { overflow: auto; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 4px 18px rgba(15,23,42,.045); }
.word-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.word-table thead { background: #edf2f9; color: #334155; }
.word-table th { padding: 12px 11px; border-bottom: 1px solid #dbe3ee; text-align: left; font-size: calc(12px * var(--voca-scale)); font-weight: 850; white-space: nowrap; }
.word-table td { padding: 13px 11px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.word-table tbody tr:last-child td { border-bottom: 0; }
.word-table tbody tr:hover { background: #f8fbff; }
.word-table th.band-col, .word-table td.band-badge-cell { width: 48px; text-align: center; padding: 4px 2px; }
.word-table th:nth-child(2), .word-table td:nth-child(2) { width: 27%; }
.word-table th:nth-child(3), .word-table td:nth-child(3) { width: 34%; }
.word-table th:nth-child(4), .word-table td:nth-child(4) { width: 310px; }
.word-table th:nth-child(5), .word-table td:nth-child(5) { width: 54px; text-align: center; }
.rank-marker { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tier-badge { width: 22px; height: 22px; flex: 0 0 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 900; }
.tier-badge.tier-1 { background: #2563eb; }
.tier-badge.tier-2 { background: #059669; }
.tier-badge.tier-3 { background: #d97706; }
.tier-badge.tier-4 { background: #7c3aed; }
.rank-number { color: #475569; font-size: calc(12px * var(--voca-scale)); font-weight: 850; font-variant-numeric: tabular-nums; }
.word-info-cell { min-width: 0; }
.word-main { color: #172554; font-size: calc(22px * var(--voca-scale)); font-weight: 850; line-height: 1.18; letter-spacing: -.025em; overflow-wrap: anywhere; }
.word-subline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin-top: 5px; color: #64748b; font-size: calc(14px * var(--voca-scale)); line-height: 1.4; overflow-wrap: anywhere; }
.subline-label { color: #94a3b8; font-size: calc(10px * var(--voca-scale)); font-weight: 800; }
.forms-cell { color: #475569; font-weight: 600; }
.meaning-main { color: #1e293b; font-size: calc(17px * var(--voca-scale)); font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.english-def { margin-top: 4px; color: #64748b; font-size: calc(14px * var(--voca-scale)); line-height: 1.5; overflow-wrap: anywhere; }
.tools-cell { white-space: nowrap; }
.check-cell { text-align: center; }
.checked-row .word-main { color: #b91c1c; }
@media (max-width: 1050px) {
  .word-table th:nth-child(2), .word-table td:nth-child(2) { width: 24%; }
  .word-table th:nth-child(3), .word-table td:nth-child(3) { width: 30%; }
  .word-table th:nth-child(4), .word-table td:nth-child(4) { width: 290px; }
  .action-button, .audio-btn, .dict-link, .voca-art-trigger { min-width: 0; }
}
@media (max-width: 760px) {
  .main-content { width: calc(100% - 20px); margin-top: 10px; }
  .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .word-table, .word-table tbody { display: block; width: 100%; }
  .word-table thead { display: none; }
  .word-table tbody tr { display: grid; grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "badge word check" "meaning meaning meaning" "tools tools tools"; gap: 9px 10px; align-items: start; margin-bottom: 9px; padding: 13px 12px; border: 1px solid #e2e8f0; border-radius: 13px; background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.045); }
  .word-table td { display: block; width: auto !important; padding: 0; border: 0; min-width: 0; }
  .word-table td:nth-child(1) { grid-area: badge; }
  .word-table td:nth-child(2) { grid-area: word; }
  .word-table td:nth-child(3) { grid-area: meaning; }
  .word-table td:nth-child(4) { grid-area: tools; }
  .word-table td:nth-child(5) { grid-area: check; justify-self: end; }
  .rank-marker { gap: 5px; }
  .tier-badge { width: 21px; height: 21px; flex-basis: 21px; }
  .word-main { font-size: calc(22px * var(--voca-scale)); }
  .word-subline { margin-top: 4px; font-size: calc(14px * var(--voca-scale)); }
  .meaning-main { font-size: calc(16px * var(--voca-scale)); }
  .english-def { font-size: calc(13px * var(--voca-scale)); }
  .tools-cell { padding-top: 1px !important; }
  .action-group { display: flex; align-items: center; justify-content: flex-start; gap: 7px; width: max-content; max-width: 100%; }
}

.kcv-lv{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:999px;font:700 11px/1.5 system-ui,sans-serif;vertical-align:middle;letter-spacing:0}
.kcv-lv-1{background:#dcfce7;color:#166534}.kcv-lv-2{background:#dbeafe;color:#1e40af}.kcv-lv-3{background:#f3e8ff;color:#6b21a8}
[data-theme="dark"] .kcv-lv-1,html.dark .kcv-lv-1{background:#14532d;color:#bbf7d0}[data-theme="dark"] .kcv-lv-2,html.dark .kcv-lv-2{background:#1e3a8a;color:#bfdbfe}[data-theme="dark"] .kcv-lv-3,html.dark .kcv-lv-3{background:#581c87;color:#e9d5ff}

.idm-type{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:999px;font:700 11px/1.5 system-ui,sans-serif;vertical-align:middle}
.idm-type-1{background:#e0f2fe;color:#075985}.idm-type-2{background:#fef3c7;color:#92400e}.idm-type-3{background:#ede9fe;color:#5b21b6}
.idm-ex{margin-top:6px;font-size:.92em;line-height:1.55}
.idm-ex span{display:block;color:#334155;font-style:italic}
.idm-ex small{display:block;color:#64748b;font-size:.92em}
.idm-origin{margin-top:6px;font-size:.88em;line-height:1.55;color:#57534e;background:#fafaf9;border-left:3px solid #d6d3d1;padding:4px 8px;border-radius:0 6px 6px 0}
.idm-origin b{margin-right:6px;color:#44403c}
.idm-origin.is-theory{border-left-color:#fbbf24}
.idm-rel{margin-top:4px;font-size:.85em;color:#64748b}
html[data-theme="dark"] .idm-type-1{background:#0c4a6e;color:#bae6fd}html[data-theme="dark"] .idm-type-2{background:#78350f;color:#fde68a}html[data-theme="dark"] .idm-type-3{background:#4c1d95;color:#ddd6fe}
html[data-theme="dark"] .idm-ex span{color:#cbd5e1}html[data-theme="dark"] .idm-ex small,html[data-theme="dark"] .idm-rel{color:#94a3b8}
html[data-theme="dark"] .idm-origin{background:#1c1917;color:#d6d3d1;border-left-color:#57534e}html[data-theme="dark"] .idm-origin b{color:#e7e5e4}

.idm-particles{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 0}
.idm-particles-label{font-size:12px;font-weight:700;color:#64748b;margin-right:4px}
.idm-particles button{border:1px solid #dbe3ee;background:#fff;color:#0f172a;border-radius:999px;padding:4px 11px;font-family:inherit;font-size:13px;font-weight:600;line-height:1.4;cursor:pointer}
.idm-particles button small{color:#94a3b8;font-weight:500;margin-left:2px}
.idm-particles button[aria-pressed="true"]{background:#0369a1;border-color:#0369a1;color:#fff}.idm-particles button[aria-pressed="true"] small{color:#bae6fd}
.idm-particle-info{margin:10px 0 0;padding:10px 14px;border-radius:12px;background:#f0f9ff;border:1px solid #bae6fd;font-size:14px;color:#0c4a6e}
.idm-particle-info>b{font-size:18px;margin-right:8px}
.idm-particle-ex{margin-top:4px;font-size:13px;color:#334155}.idm-particle-ex span{color:#64748b}
html[data-theme="dark"] .idm-particles button{background:#111a2b;border-color:#1f2a3c;color:#e2e8f0}
html[data-theme="dark"] .idm-particle-info{background:#0b2235;border-color:#0c4a6e;color:#bae6fd}html[data-theme="dark"] .idm-particle-ex{color:#cbd5e1}

/* v133: compact, translucent particle strip inside the header. */
body.idiom-page .top-panel .idm-particles {display:flex;flex-wrap:nowrap;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:3px 0 5px;box-sizing:border-box;}
body.idiom-page .top-panel .idm-particles button {flex:0 0 auto;white-space:nowrap;scroll-snap-align:start;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.25);color:#f5f7fa;box-shadow:none;}
body.idiom-page .top-panel .idm-particles button small {color:rgba(255,255,255,.78);}
body.idiom-page .top-panel .idm-particles button:hover {background:rgba(255,255,255,.18);}
body.idiom-page .top-panel .idm-particles button[aria-pressed="true"] {background:rgba(255,255,255,.29);border-color:rgba(255,255,255,.65);color:#fff;}
body.idiom-page .top-panel .idm-particles button[aria-pressed="true"] small {color:#fff;}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particles button {background:rgba(15,23,42,.25);border-color:rgba(255,255,255,.25);color:#e7edf5;}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particles button:hover {background:rgba(255,255,255,.13);}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particles button[aria-pressed="true"] {background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.58);color:#fff;}
body.idiom-page .top-panel .idm-particles button:focus-visible {outline:2px solid #fff;outline-offset:-2px;}

/* v135: arrow navigation without visible scrollbar. */
body.idiom-page .top-panel .idm-particle-wrap {display:flex;align-items:center;gap:5px;width:100%;min-width:0;box-sizing:border-box;}
body.idiom-page .top-panel .idm-particles {flex:1 1 0;width:0;margin:0;padding:3px 0;scrollbar-width:none;-ms-overflow-style:none;}
body.idiom-page .top-panel .idm-particles::-webkit-scrollbar {display:none;}
body.idiom-page .top-panel .idm-particles button {background:rgba(0,0,0,.16);border-color:rgba(255,255,255,.24);}
body.idiom-page .top-panel .idm-particles button:hover {background:rgba(0,0,0,.25);}
body.idiom-page .top-panel .idm-particles button[aria-pressed="true"] {background:rgba(0,0,0,.38);border-color:rgba(255,255,255,.7);}
body.idiom-page .top-panel .idm-particle-nav {flex:0 0 30px;width:30px;height:30px;padding:0;border:1px solid rgba(255,255,255,.24);border-radius:50%;background:rgba(0,0,0,.16);color:#f5f7fa;font:800 18px/1 system-ui;cursor:pointer;}
body.idiom-page .top-panel .idm-particle-nav:disabled {opacity:.3;cursor:default;}
body.idiom-page .top-panel .idm-particle-nav:not(:disabled):hover {background:rgba(0,0,0,.28);}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particles button,html[data-theme="dark"] body.idiom-page .top-panel .idm-particle-nav {background:rgba(0,0,0,.25);}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particles button:hover {background:rgba(0,0,0,.35);}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particles button[aria-pressed="true"] {background:rgba(0,0,0,.48);border-color:rgba(255,255,255,.65);}

/* v136: particle explanation inherits the warm header palette. */
body.idiom-page .top-panel .idm-particle-info {background:rgba(0,0,0,.15);border-color:rgba(255,255,255,.24);color:#fff4e9;}
body.idiom-page .top-panel .idm-particle-info>b {color:#fffaf4;}
body.idiom-page .top-panel .idm-particle-ex {color:#f1e5d9;}
body.idiom-page .top-panel .idm-particle-ex span {color:#e4d5c7;}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particle-info {background:rgba(0,0,0,.25);border-color:rgba(255,255,255,.22);color:#f2e6da;}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particle-ex {color:#e5d8cb;}
html[data-theme="dark"] body.idiom-page .top-panel .idm-particle-ex span {color:#d6c5b5;}

/* v137: brighter particle text and balanced vertical spacing. */
body.wb-tidy.voca-page.idiom-page .top-inner {padding-bottom:12px;}
body.idiom-page .top-panel .idm-particle-wrap {margin-block:0; padding-block:2px;}
body.idiom-page .top-panel .idm-particles {padding-block:0;}
body.idiom-page .top-panel .idm-particle-info {margin-top:0;}
body.idiom-page .top-panel .idm-particles button,
body.idiom-page .top-panel .idm-particles button small,
body.idiom-page .top-panel .idm-particle-nav,
body.idiom-page .top-panel .idm-particle-info,
body.idiom-page .top-panel .idm-particle-info > b,
body.idiom-page .top-panel .idm-particle-ex,
body.idiom-page .top-panel .idm-particle-ex span {color:#fff!important; opacity:1;}
body.idiom-page .top-panel .idm-particle-nav:disabled {opacity:.4;}
@media(max-width:760px){body.wb-tidy.voca-page.idiom-page .top-inner {padding-bottom:10px;}}
