#catalogPanel.vd-catalog-panel {
    background: #f3f6fa;
    overscroll-behavior: contain;
    overflow-x: hidden;
    color: #182638;
}
#catalogPanel [hidden] { display: none !important; }
.vd-catalog-shell {
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 36px;
}
.vd-catalog-toolbar {
    position: sticky;
    z-index: 2;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 360px) auto;
    align-items: center;
    gap: 16px;
    padding: 20px 0 16px;
    background: #f3f6fa;
    border-bottom: 1px solid #dce4ee;
}
.vd-catalog-toolbar h2 {
    margin: 0;
    font-size: clamp(24px, 3.2vw, 38px);
    line-height: 1.15;
    letter-spacing: -.035em;
}
.vd-catalog-search {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    background: white;
    border: 1px solid #cdd8e5;
    border-radius: 12px;
    color: #435674;
}
.vd-catalog-search input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #182638;
    font: inherit;
    font-size: 16px;
}
.vd-catalog-close {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #dce4ee;
    border-radius: 12px;
    background: #fff;
    color: #253650;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.vd-catalog-status { margin: 24px 0; color: #435674; }
.vd-catalog-quick { margin: 20px 0; }
.vd-catalog-quick h3 { margin: 0 0 10px; font-size: 15px; }
.vd-catalog-quick nav, .vd-catalog-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}
.vd-catalog-quick a, .vd-catalog-card nav a {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #182638;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.vd-catalog-quick a {
    background: #fff;
    border: 1px solid #dce4ee;
    font-weight: 600;
}
.vd-catalog-link-label { min-width: 0; }
.vd-catalog-thumb {
    display: block;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    background: #edf2f8;
}
.vd-catalog-quick a:has(.vd-catalog-thumb) { min-height: 72px; }
@media (max-width: 400px) {
    .vd-catalog-quick a { padding: 7px; gap: 6px; font-size: 13px; }
    .vd-catalog-quick .vd-catalog-thumb { flex-basis: 38px; width: 38px; height: 38px; }
}
.vd-catalog-quick a.active { background: #e6eeff; border-color: #b9cff4; }
.vd-catalog-card {
    position: relative;
    min-width: 0;
    border-radius: 16px;
    border: 1px solid #dce4ee;
    background: #fff;
    box-shadow: 0 3px 12px #1836570a;
}
.vd-catalog-card summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 56px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
    border-radius: 15px;
}
.vd-catalog-card summary::-webkit-details-marker { display: none; }
.vd-catalog-card summary::after {
    content: 'Развернуть';
    font-size: 12px;
    color: #435674;
}
.vd-catalog-card[open] summary::after { content: 'Свернуть'; }
.vd-catalog-card[open] summary { background: #f2f6fd; }
.vd-catalog-group-name { flex: 1; font-weight: 700; overflow-wrap: anywhere; }
.vd-catalog-group-size {
    border-radius: 20px;
    background: #e8effa;
    color: #344d70;
    padding: 3px 7px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.vd-catalog-card[open] { z-index: 1; }
.vd-catalog-card nav {
    position: absolute;
    inset-inline: -1px;
    top: calc(100% + 4px);
    box-sizing: border-box;
    max-height: min(360px, 48vh);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #dce4ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px #18365733;
}
.vd-catalog-card.vd-catalog-opens-up nav {
    top: auto;
    bottom: calc(100% + 4px);
}
.vd-catalog-card nav a:hover, .vd-catalog-quick a:hover, .vd-catalog-close:hover { background: #e8f0ff; }
.vd-catalog-panel :is(a, button, input, summary):focus-visible { outline: 2px solid #2457a8; outline-offset: 2px; }
.vd-catalog-mobile { display: none; }
@media (max-width: 1050px) {
    .vd-catalog-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .vd-catalog-shell { padding: 0 14px 24px; }
    .vd-catalog-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 0; }
    .vd-catalog-search { grid-column: 1 / -1; grid-row: 2; }
    .vd-catalog-close { grid-column: 2; grid-row: 1; }
    .vd-catalog-quick { margin: 15px 0; }
    .vd-catalog-quick nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .vd-catalog-groups { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .vd-catalog-desktop { display: none; }
    .vd-catalog-mobile { display: block; }
}
