body.ys .yinse-catalog-panel > .yinse-catalog-heading,
body.ys .yinse-sidebar-panel > .yinse-index-heading {
    --catalog-surface: rgba(248, 253, 255, .56);
    --catalog-border: #86aebf;
    --catalog-text: #173e54;
    --catalog-accent: #256786;
    --catalog-action: #215775;
    --catalog-focus: #23789c;
    --broadcast-surface: #fffbf1;
    --broadcast-border: #e3bf75;
    --broadcast-text: #753512;
    --broadcast-badge: #ffe3a1;
}

html.xg-midnight body.ys .yinse-catalog-panel > .yinse-catalog-heading,
html.xg-midnight body.ys .yinse-sidebar-panel > .yinse-index-heading {
    --catalog-surface: rgba(39, 25, 57, .88);
    --catalog-border: #785695;
    --catalog-text: #f2e6fd;
    --catalog-accent: #ddbbfb;
    --catalog-action: #67428e;
    --catalog-focus: #d0a0ff;
    --broadcast-surface: #302039;
    --broadcast-border: #a97962;
    --broadcast-text: #ffe6b1;
    --broadcast-badge: #f9cf83;
}

body.ys .yinse-catalog-panel > .yinse-catalog-heading.xg-catalog-has-notice {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center !important;
    gap: 10px 16px;
    padding-right: 22px !important;
}

body.ys .yinse-catalog-panel > .xg-catalog-has-notice > .yinse-index-heading-copy {
    min-width: 0;
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
}

body.ys .yinse-catalog-panel > .xg-catalog-has-notice > .yinse-catalog-tools {
    position: static !important;
    grid-column: 1 / -1;
    width: 100% !important;
    margin: 0 !important;
    min-width: 0;
}

body.ys .xg-catalog-announcement {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
    padding: 5px 7px 5px 10px;
    border: 1px solid var(--broadcast-border);
    border-radius: 12px;
    background: var(--broadcast-surface);
    color: var(--broadcast-text);
    line-height: 1.45;
    font-size: .85rem;
}

.xg-catalog-announcement-label {
    flex: none;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--broadcast-badge);
    color: #542600;
    font-weight: 750;
    white-space: nowrap;
}

.xg-catalog-announcement-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.xg-catalog-announcement-track {
    display: flex;
    width: max-content;
    min-width: 200%;
    animation: xg-catalog-scroll 20s linear infinite;
}

.xg-catalog-announcement-track > span {
    flex: 1 0 auto;
    padding-right: 36px;
    font-weight: 700;
    white-space: nowrap;
}

@keyframes xg-catalog-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.xg-catalog-announcement-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.xg-catalog-announcement-control {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 8px;
    color: var(--broadcast-text);
    cursor: pointer;
}

.xg-catalog-announcement-toggle:focus-visible ~ .xg-catalog-announcement-control,
body.ys .yinse-catalog-heading .yinse-search-combo:focus-within {
    outline: 2px solid var(--catalog-focus);
    outline-offset: 2px;
}

#xg-catalog-announcement-pause:checked ~ .xg-catalog-announcement-viewport .xg-catalog-announcement-track {
    animation-play-state: paused;
}

.xg-catalog-announcement-play,
#xg-catalog-announcement-pause:checked ~ label[for="xg-catalog-announcement-pause"] .xg-catalog-announcement-pause {
    display: none;
}

#xg-catalog-announcement-pause:checked ~ label[for="xg-catalog-announcement-pause"] .xg-catalog-announcement-play {
    display: inline;
}

body.ys .yinse-catalog-heading .yinse-catalog-tools > .yinse-search-combo {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--catalog-border) !important;
    border-radius: 14px;
    background: var(--catalog-surface) !important;
    box-shadow: none !important;
}

body.ys .yinse-catalog-heading .yinse-search-combo .yinse-searchbox-combo {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 0 0 0 9px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
    color: var(--catalog-accent);
}

body.ys .yinse-catalog-heading .yinse-searchbox-combo .item-search-input {
    width: 100%;
    min-width: 0;
    color: var(--catalog-text) !important;
    font-size: 16px;
}

body.ys .yinse-catalog-heading .yinse-searchbox-combo .item-search-input::placeholder {
    color: var(--catalog-accent) !important;
    opacity: 1;
}

body.ys .yinse-catalog-heading .yinse-search-combo > .item-search-trigger {
    flex: none;
    min-height: 38px;
    min-width: 64px;
    margin: 0;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--catalog-action) !important;
    color: #fff !important;
    font-size: .85rem;
    white-space: nowrap;
}

body.ys .yinse-catalog-heading .item-search-trigger:hover {
    filter: brightness(1.12);
}

@media (min-width: 768px) {
    body.ys .yinse-catalog-panel > .xg-catalog-has-notice > .yinse-index-heading-copy {
        grid-column: 1;
        grid-row: 1;
    }

    body.ys .yinse-catalog-panel > .xg-catalog-has-notice > .yinse-catalog-tools {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (min-width: 1181px) {
    body.ys .yinse-catalog-panel > .yinse-catalog-heading.xg-catalog-has-notice {
        grid-template-columns: minmax(95px, max-content) minmax(0, 1fr) min(32%, 350px);
    }

    body.ys .xg-catalog-has-notice > .xg-catalog-announcement {
        grid-column: 2;
        grid-row: 1;
    }

    body.ys .yinse-catalog-panel > .xg-catalog-has-notice > .yinse-catalog-tools {
        grid-column: 3;
    }
}

@media (max-width: 767px) {
    body.ys .xg-catalog-has-notice > .xg-catalog-announcement {
        grid-row: 2;
    }
}

.xg-catalog-announcement-enable,
.xg-catalog-announcement-reduced-control {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    #xg-catalog-announcement-pause,
    .xg-catalog-announcement-control[for="xg-catalog-announcement-pause"] {
        display: none;
    }

    .xg-catalog-announcement-enable {
        display: block;
    }

    .xg-catalog-announcement-reduced-control {
        display: grid;
    }

    .xg-catalog-announcement-enable:not(:checked) ~ .xg-catalog-announcement-viewport .xg-catalog-announcement-track {
        display: block;
        width: auto;
        min-width: 0;
        animation: none;
    }

    .xg-catalog-announcement-enable:not(:checked) ~ .xg-catalog-announcement-viewport .xg-catalog-announcement-track > span {
        padding: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .xg-catalog-announcement-enable:not(:checked) ~ .xg-catalog-announcement-viewport [aria-hidden],
    .xg-catalog-announcement-enable:not(:checked) ~ .xg-catalog-announcement-reduced-control .xg-catalog-announcement-pause {
        display: none;
    }

    .xg-catalog-announcement-enable:not(:checked) ~ .xg-catalog-announcement-reduced-control .xg-catalog-announcement-play {
        display: inline;
    }
}
