/* HSK-specific word card layout. Shared UI components are in ../shared/common.css */
.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:nth-child(1), .word-table td:nth-child(1) { width: 100px; }
.word-table th:nth-child(2), .word-table td:nth-child(2) { width: 26%; }
.word-table th:nth-child(3), .word-table td:nth-child(3) { width: 29%; }
.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; }
.hsk-rank-cell { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.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: #16a34a; }
.tier-badge.tier-2 { background: #2563eb; }
.tier-badge.tier-3 { background: #d97706; }
.tier-badge.tier-4 { background: #7c3aed; }
.tier-badge.tier-5 { background: #ea580c; }
.tier-badge.tier-6 { background: #db2777; }
.rank-number { color: #475569; font-size: calc(12px * var(--voca-scale)); font-weight: 850; font-variant-numeric: tabular-nums; }
.hsk-level-tag { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: calc(10px * var(--voca-scale)); font-weight: 900; white-space: nowrap; }
.hsk-level-tag.l1 { background: #dcfce7; color: #166534; }
.hsk-level-tag.l2 { background: #dbeafe; color: #1d4ed8; }
.hsk-level-tag.l3 { background: #fef3c7; color: #92400e; }
.hsk-level-tag.l4 { background: #ede9fe; color: #6d28d9; }
.hsk-level-tag.l5 { background: #ffedd5; color: #c2410c; }
.hsk-level-tag.l6 { background: #fce7f3; color: #be185d; }
.hsk-number { color: #94a3b8; font-size: calc(11px * var(--voca-scale)); font-weight: 750; font-variant-numeric: tabular-nums; }
.word-info-cell { min-width: 0; }
.hanzi { color: #172554; font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "SimSun", sans-serif; font-size: calc(28px * var(--voca-scale)); font-weight: 850; line-height: 1.14; letter-spacing: .015em; overflow-wrap: anywhere; }
.pinyin { margin-top: 5px; color: #0369a1; font-size: calc(16px * var(--voca-scale)); font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.meaning-main { color: #1e293b; font-size: calc(17px * var(--voca-scale)); font-weight: 750; line-height: 1.48; overflow-wrap: anywhere; }
.tools-cell { white-space: nowrap; }
.check-cell { text-align: center; }
.checked-row .hanzi { 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: 26%; }
  .word-table th:nth-child(4), .word-table td:nth-child(4) { width: 295px; }
}
@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: "rank 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: rank; }
  .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; }
  .hsk-rank-cell { flex-direction: row; align-items: center; gap: 5px; }
  .hanzi { font-size: calc(27px * var(--voca-scale)); }
  .pinyin { margin-top: 4px; font-size: calc(15px * var(--voca-scale)); }
  .meaning-main { font-size: calc(16px * var(--voca-scale)); }
  .action-group { display: flex; gap: 7px; justify-content: flex-start; }
}
