.lookupTab { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.lookupTab svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.editor > .side.lookupActive { display: flex; flex-direction: column; overflow: hidden; }
.lookupActive .sideHeader { flex: none; }
.editorLookupPanel { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.editorLookupPanel .lookupControls { flex: none; padding: 8px 10px 0; border: 0; }
.lookupSearch { min-height: 36px; gap: 4px; padding-left: 8px; }
.lookupSearch #editorLookupSearch { font-size: 12px; }
.lookupFilters { box-sizing: border-box; flex: none; min-height: 0; max-height: min(230px, 38%, max(36px, calc(100% - 160px))); padding: 0 10px 8px; }
.lookupPagination.sidePagination { box-sizing: border-box; flex: none; margin: 0; padding: 2px 10px; min-height: 28px; font-size: 11px; border-bottom: 1px solid var(--ui-border); }
.lookupPagination > .lookupRange { flex: none; white-space: nowrap; }
.lookupPagination > .lookupCopyStatus { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lookupPagination button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 26px; min-height: 24px; padding: 2px; }
.lookupPagination button:first-of-type { margin-left: auto; }
.lookupPagination svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lookupBody { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); flex: 1; min-height: 0; min-width: 0; }
.lookupControls h2 { margin: 0 0 4px; font: 600 16px/1.4 system-ui, sans-serif; }
.lookupControls p { margin: 0; color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
.lookupOptions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 8px; }
.lookupOptions label { min-width: 0; color: var(--ui-muted); font-size: 11px; }
.lookupOptions select { display: block; box-sizing: border-box; width: 100%; margin-top: 3px; color: var(--color-font); }
.lookupTranslationFilter { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--color-font); font-size: 12px; cursor: pointer; }
.lookupTranslationFilter input { margin: 0; flex: none; }
.lookupResults { box-sizing: border-box; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px; border-bottom: 1px solid var(--ui-border); }
.editor .lookupResult { display: block; box-sizing: border-box; width: 100%; margin: 0 0 6px; padding: 9px 10px; text-align: left; border: 1px solid var(--ui-border); border-radius: 6px; line-height: 1.5; }
.lookupResult.active { background: var(--ui-accent-soft); border-color: var(--ui-accent); }
.lookupResult strong, .lookupResult span { display: block; overflow-wrap: anywhere; }
.lookupResult strong { font-size: 12px; font-weight: 600; }
.lookupResult span { color: var(--ui-muted); font-size: 12px; margin-top: 3px; }
.lookupResult .lookupResultEnglish { color: var(--color-font); }
.lookupResult .lookupResultStats { font-size: 11px; }
.lookupQueryMatch { padding: 0 1px; border-radius: 2px; background: #ffe08a; color: #352600; font-weight: 650; }
.lookupReference { box-sizing: border-box; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 10px; }
.editor .lookupReference h3 { margin: 0 0 5px; font: 600 13px/1.5 system-ui, sans-serif; overflow-wrap: anywhere; }
.lookupReference header p { margin: 0 0 6px; color: var(--ui-muted); font-size: 11px; }
.lookupReference header details { margin-bottom: 8px; font-size: 11px; color: var(--ui-muted); }
.lookupReference header summary { cursor: pointer; }
.lookupStats { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ui-muted); font-size: 11px; }
.lookupReferenceBlock { padding: 10px 0; border-top: 1px solid var(--ui-border); }
.lookupReferenceBlock h4 { margin: 0 0 8px; color: var(--ui-muted); font-size: 11px; font-weight: 500; }
.lookupTextPair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lookupTextPair > section { min-width: 0; }
.lookupTextLabel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; color: var(--ui-muted); font-size: 11px; font-weight: 600; }
.lookupTextLabel button { flex: none; font-size: 11px; padding: 3px 8px; }
.lookupText { margin: 0; padding: 8px; background: var(--color-element); border: 1px solid var(--ui-border); border-radius: 5px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; line-height: 1.7; user-select: text; }
.lookupEmpty { margin: 0; padding: 8px 0; color: var(--ui-muted); font-size: 13px; line-height: 1.6; }
:is(.editorLookupPanel, .lookupTab) :is(button, input, select, [tabindex]):focus-visible, .lookupTab:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
@media (max-width: 760px) {
  .editor > .side.lookupActive { min-height: 580px; height: 75vh; }
}
