.tool-heading-actions > .tool-quick-action-row {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.tool-quick-action-row > :is(button, a) { flex-shrink: 0; white-space: nowrap; }
.tool-quick-search {
    --tqs-surface: #211d2c;
    --tqs-field: #242132;
    --tqs-border: #494356;
    --tqs-text: #f3eff9;
    --tqs-muted: #b9b2c7;
    --tqs-accent: #aaa1ff;
    --tqs-selected: #373152;
    position: relative;
    flex: 0 1 auto;
    width: clamp(154px, 14vw, 218px);
    min-width: 0;
    color: var(--tqs-text);
}
:root[data-display-mode="light"] .tool-quick-search {
    --tqs-surface: #fff;
    --tqs-field: #f5f5fa;
    --tqs-border: #c9ccd9;
    --tqs-text: #1a2034;
    --tqs-muted: #565c70;
    --tqs-accent: #4d40b5;
    --tqs-selected: #efedff;
}
.tool-quick-field { position: relative; }
.tool-quick-field > i {
    position: absolute;
    inset: 50% auto auto 11px;
    transform: translateY(-50%);
    color: var(--tqs-muted);
    pointer-events: none;
    font-size: 13px;
}
.tool-quick-field input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 39px;
    padding: 7px 9px 7px 33px;
    border: 1px solid var(--tqs-border);
    border-radius: 9px;
    background: var(--tqs-field);
    color: var(--tqs-text);
    font-size: 13px;
}
.tool-quick-field input::placeholder { color: var(--tqs-muted); opacity: 1; }
.tool-quick-search :is(input, a):focus-visible { outline: 2px solid var(--tqs-accent); outline-offset: 2px; }
.tool-quick-popup {
    position: absolute;
    z-index: 70;
    inset: calc(100% + 7px) auto auto 0;
    width: min(336px, calc(100vw - 36px));
    border: 1px solid var(--tqs-border);
    border-radius: 12px;
    background: var(--tqs-surface);
    box-shadow: 0 12px 30px #0a07173d;
}
.tool-quick-popup[hidden], .tool-quick-note:empty { display: none; }
.tool-quick-note { padding: 10px 12px; color: var(--tqs-muted); font-size: 13px; }
#toolQuickSearchResults {
    max-height: min(350px, 51dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
}
#toolQuickSearchResults:not(:empty) { padding: 4px; }
#toolQuickSearchResults [role="option"] {
    min-height: 44px;
    padding: 6px 9px;
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    color: var(--tqs-text);
}
#toolQuickSearchResults [role="option"]:is(:hover,[aria-selected="true"]) { background: var(--tqs-selected); }
#toolQuickSearchResults [role="option"] > i { text-align: center; color: var(--tqs-accent); font-size: 13px; }
#toolQuickSearchResults :is(strong, small) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#toolQuickSearchResults strong { font-size: 13px; font-weight: 700; }
#toolQuickSearchResults small, .tool-quick-access { font-size: 11px; color: var(--tqs-muted); }
.tool-quick-directory {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    padding: 6px 12px;
    border-top: 1px solid var(--tqs-border);
    color: var(--tqs-accent);
    font-size: 12px;
    font-weight: 700;
}
.tool-quick-directory:hover { text-decoration: underline; }
@media (min-width: 640px) and (max-width: 1090px) {
    .tool-heading-layout:not(.tool-header-row):has(.tool-quick-action-row) { flex-wrap: wrap; }
    .tool-heading-layout:not(.tool-header-row):has(.tool-quick-action-row) > .tool-heading-copy { flex-basis: calc(100% - 54px); }
    .tool-heading-layout:not(.tool-header-row) > .tool-heading-actions:has(.tool-quick-action-row) { width: 100%; }
}
@media (max-width: 639px) {
    .tool-heading-layout.tool-header-row > .tool-heading-actions:has(> .tool-quick-action-row) {
        grid-area: auto / 1 / auto / -1;
        margin-top: 4px;
    }
    .tool-heading-actions > .tool-quick-action-row { flex-wrap: nowrap; }
    .tool-quick-action-row .tool-quick-search { flex: 1 1 auto; width: auto; }
    .tool-quick-field input { min-height: 44px; font-size: 16px; }
}
