.word-article [hidden] { display: none !important; }
.word-reference-search, .word-reference-filter { margin: 16px 0; }
.word-reference-search label, .word-reference-filter label {
    display: block; font-size: 14px; font-weight: 800; margin-bottom: 7px;
}
.word-reference-search > div { display: flex; gap: 8px; }
.word-reference-search input, .word-reference-filter input {
    appearance: none; background: #fff; border: 1px solid #a9ccdf; border-radius: 6px;
    box-sizing: border-box; color: #244d6d; font: inherit; font-size: 16px;
    min-height: 44px; min-width: 0; padding: 10px; width: 100%;
}
.word-reference-search button {
    background: #e4f0fb; border: 1px solid #a9c9e7; border-radius: 6px;
    color: #174ea6; cursor: pointer; font: inherit; font-size: 14px;
    flex-shrink: 0; font-weight: 800; min-height: 44px; min-width: 64px;
    padding: 8px 12px; white-space: nowrap;
}
.word-reference-levels { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; }
.word-reference-levels a {
    background: #edf5fd; border: 1px solid #c8ddeb; border-radius: 6px;
    color: #174ea6; display: flex; flex-direction: column; padding: 9px 4px;
    text-align: center; text-decoration: none;
}
.word-reference-levels a:nth-child(2) { background: #eef9f2; border-color: #c0e0cd; }
.word-reference-levels a:nth-child(3) { background: #fff6e9; border-color: #efd4a9; }
.word-reference-levels a:nth-child(4) { background: #f8f0fb; border-color: #ddc7e8; }
.word-reference-levels a[aria-current="page"] { border-color: #5888b3; box-shadow: inset 0 0 0 1px #5888b3; }
.word-reference-levels strong { font-size: 16px; }
.word-reference-levels span { font-size: 12px; color: #43677f; }
.word-reference-pagination { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 18px 0; }
.word-reference-pagination a {
    align-items: center; background: #f1f7fc; border: 1px solid #c9deed;
    border-radius: 5px; color: #265680; display: flex; font-size: 12px;
    font-weight: 800; justify-content: center; min-height: 40px; padding: 2px;
    text-align: center; text-decoration: none; white-space: nowrap;
}
.word-reference-pagination a[aria-current] { background: #d9ecfb; border-color: #5c95c3; color: #174ea6; }
.word-reference-topics { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 20px; }
.word-reference-topics a {
    background: #edf5fd; border: 1px solid #c6ddec; border-radius: 6px; color: #265680;
    font-size: 13px; font-weight: 700; padding: 7px 10px; text-decoration: none;
}
.word-reference-topics a:nth-child(4n + 2) { background: #eef9f2; border-color: #c2dfcd; color: #29654a; }
.word-reference-topics a:nth-child(4n + 3) { background: #fff5e8; border-color: #eed1a5; color: #81591d; }
.word-reference-topics a:nth-child(4n) { background: #f8effb; border-color: #dcc5e7; color: #704b80; }
.word-article .word-reference-note { color: #526d81; font-size: 13px; line-height: 1.5; margin: 12px 0; }
.word-reference-note a { color: #174ea6; text-underline-offset: 3px; }
.word-reference-list { display: grid; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0; }
.word-reference-row {
    align-items: center; background: #fff; border: 1px solid #d4e5f0;
    border-radius: 7px; box-shadow: 0 1px 1px rgb(19 70 105 / 6%); display: grid;
    gap: 5px 12px; grid-template-columns: minmax(0, 1fr) 76px;
    min-height: 78px; padding: 12px 14px; position: relative;
}
.word-reference-row:nth-child(even) { background: #f3f8fc; }
.word-reference-list--read-only .word-reference-row { grid-template-columns: minmax(0, 1fr) 35px; }
.word-reference-controls { align-self: start; grid-column: 2; grid-row: 1; justify-self: end; }
.word-reference-word { align-self: start; display: flex; flex-direction: column; grid-column: 1; grid-row: 1; min-width: 0; }
.word-reference-word strong { color: #174ea6; font-size: 17px; line-height: 1.4; min-width: 0; }
.word-reference-ipa {
    background: #f5eef9; border: 1px solid #dfcfe8; border-radius: 4px;
    color: #665173; display: block; font-family: Arial, sans-serif; font-size: 12px; font-weight: 500;
    line-height: 18px; margin-top: 3px; overflow-wrap: anywhere; padding: 0 5px; width: fit-content;
}
.word-reference-translation {
    border-top: 1px solid #d5e4ed; color: #294f6d; font-size: 14px; font-weight: 600;
    grid-column: 1 / -1; grid-row: 2; line-height: 1.45;
    margin-top: 3px; min-height: 0; padding: 8px 0 0;
}
.word-reference-actions { align-items: center; display: flex; gap: 6px; justify-content: flex-end; min-height: 35px; }
.word-reference-icon {
    align-items: center; background: #e8f2fb; border: 1px solid #bcd5e9;
    border-radius: 6px; color: #27649a; cursor: pointer; display: inline-flex;
    flex: 0 0 35px; font: inherit; font-size: 19px; height: 35px;
    justify-content: center; line-height: 1; padding: 0; width: 35px;
}
.word-reference-icon img { display: block; height: 18px; opacity: 0.8; width: 18px; }
.word-reference-add { background: #edf7f3; border-color: #c0dccc; color: #327350; }
.word-reference-icon:hover, .word-reference-icon.is-playing { background: #d5e9fa; border-color: #6b9dbd; }
.word-reference-add.is-added { background: #dff2e5; color: #267345; }
.word-reference-icon.is-error { background: #fff0ea; border-color: #d67b63; }
.word-reference-icon:disabled { cursor: default; }
.word-reference-icon.is-loading { opacity: 0.55; }
.word-reference-search :focus-visible, .word-reference-filter input:focus-visible,
.word-reference-icon:focus-visible, .word-reference-pagination a:focus-visible,
.word-reference-levels a:focus-visible { outline: 2px solid #438bbe; outline-offset: 3px; }
.word-reference-verbs { border-collapse: collapse; font-size: 14px; table-layout: fixed; width: 100%; }
.word-reference-verbs th, .word-reference-verbs td { border-bottom: 1px solid #dce9f2; padding: 12px 6px; text-align: left; vertical-align: top; }
.word-reference-verbs thead th { background: #eaf4fc; font-size: 12px; line-height: 1.4; }
.word-reference-verbs tbody tr:nth-child(even) { background: #f3f8fc; }
.word-reference-verbs tbody th { color: #174ea6; font-size: 16px; }
.word-reference-verbs .word-reference-actions { margin-top: 6px; justify-content: flex-start; }
.word-reference-examples > div { border-left: 3px solid var(--section-accent); margin-top: 16px; padding: 2px 0 2px 14px; }
.word-article .word-reference-examples h3 { color: #174ea6; font-size: 16px; margin: 0 0 6px; }
.word-article .word-reference-examples p { font-size: 15px; margin: 5px 0; }
.word-reference-links { list-style: none; margin: 0; padding: 0; }
.word-reference-links li + li { border-top: 1px solid #dce9f2; }
.word-reference-links li { padding: 12px 0; }
.word-reference-links a { color: #174ea6; font-size: 16px; font-weight: 800; text-underline-offset: 4px; }
.word-reference-links span { display: block; font-size: 14px; margin-top: 5px; }
.word-reference-sr-only { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
@media (max-width: 540px) {
    .word-reference-verbs thead { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; width: 1px; }
    .word-reference-verbs tbody, .word-reference-verbs tr { display: block; width: 100%; }
    .word-reference-verbs tbody tr {
        border: 1px solid #cedfeb; border-radius: 7px;
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; padding: 10px 8px;
    }
    .word-reference-verbs th, .word-reference-verbs td { border: 0; padding: 4px; }
    .word-reference-verbs [data-label]::before { content: attr(data-label); display: block; font-size: 10px; color: #61788b; font-weight: 700; margin-bottom: 6px; }
    .word-reference-verbs .word-reference-meaning { align-items: center; display: flex; gap: 8px; grid-column: 1 / -1; justify-content: space-between; }
    .word-reference-verbs .word-reference-actions { flex-shrink: 0; margin: 0; }
}
@media (max-width: 359px) {
    .word-reference-pagination { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .word-reference-row { column-gap: 8px; }
}
