.catalog-card {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
}
.catalog-page {
    container-name: game-catalog;
    container-type: inline-size;
}
.catalog-page .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@container game-catalog (min-width: 360px) {
    .catalog-page .games-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@container game-catalog (min-width: 560px) {
    .catalog-page .games-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@container game-catalog (min-width: 820px) {
    .catalog-page .games-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
@container game-catalog (min-width: 1100px) {
    .catalog-page .games-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}
.provider-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: visible;
}
.provider-mark--initial {
    color: #fff;
    background: var(--primary, #2563eb);
    font-size: 17px;
    font-weight: 700;
}
.provider-mark--image {
    width: 92px;
    height: 46px;
    padding: 4px;
}
.provider-mark .provider-mark-image {
    display: block;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}
.provider-mark--compact {
    width: 30px;
    height: 30px;
    font-size: 14px;
    border-radius: 8px;
}
.provider-mark--compact.provider-mark--image {
    width: 72px;
    height: 34px;
}
.section-image {
    display: inline-flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}
.section-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.provider-section-heading {
    min-width: 0;
}
.provider-section-heading h2 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-favorite {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffffdc;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
}
.game-favorite .icon {
    display: block;
    width: 17px;
    height: 17px;
    stroke-width: 1.7;
    filter: drop-shadow(0 1px 2px #000000cc);
}
.game-favorite:hover {
    background: #07122666;
    color: #fff;
}
.game-favorite:focus-visible {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 2px;
}
.game-favorite.is-favorite {
    color: #9cc6ff;
}
.game-favorite.is-favorite .icon {
    fill: currentColor;
}
.game-favorite:disabled {
    opacity: 0.6;
    cursor: wait;
}
.catalog-page .catalog-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(320px, 420px) auto;
    align-items: end;
    gap: 12px;
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.catalog-filter-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.catalog-filter-summary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 0 12px;
    font-size: 11px;
    color: #91b6ed;
}
.catalog-filters label {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.catalog-filters label > span {
    color: #a3b8d5;
    font-size: 11px;
    font-weight: 600;
}
.catalog-filters .search-form,
.catalog-filters .input,
.catalog-filters .button {
    height: 43px;
    margin: 0;
}
.catalog-filters .search-form {
    padding: 0 12px;
    background: var(--surface-inset);
    border-radius: 9px;
}
.catalog-filters .input {
    width: 100%;
    border: 1px solid var(--surface-border);
    background: var(--surface-inset);
    border-radius: 9px;
    color: #e6efff;
    font-size: 12px;
}
.catalog-filters .input:focus,
.catalog-filters .search-form:focus-within {
    outline: 2px solid #2563eb75;
    outline-offset: 1px;
    border-color: var(--primary);
}
.catalog-filters .button svg {
    width: 17px;
    height: 17px;
}
.catalog-filter-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.catalog-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    background: var(--surface-raised);
    color: #b6c9e2;
    font-size: 12px;
    font-weight: 600;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.catalog-filter-chip svg {
    width: 16px;
    height: 16px;
}
.catalog-filter-chip:hover,
.catalog-filter-chip:focus-visible {
    color: #fff;
    border-color: var(--primary);
    background: var(--surface-raised);
}
.catalog-filter-chip.active {
    color: #fff;
    border-color: var(--primary);
    background: #1746a0;
    box-shadow: inset 0 0 0 1px #2563eb35;
}
.catalog-favorites-toggle.active svg {
    fill: currentColor;
}
.catalog-clear {
    padding: 8px 4px;
    margin-left: auto;
    color: #82b3ff;
    font-size: 11px;
}
.catalog-page .catalog-provider-selector {
    min-width: 0;
    padding: 0;
    margin-bottom: 16px;
    border: 0;
    scroll-margin-top: 85px;
}
.catalog-provider-frame {
    --provider-fade-color: var(--background, #000622);
    position: relative;
    min-width: 0;
    margin: -6px;
    padding: 6px;
}
.catalog-provider-frame::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    height: var(--provider-fade-height, 36px);
    background: linear-gradient(to bottom, transparent, var(--provider-fade-color) 90%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        visibility 0.3s;
}
.catalog-provider-frame.is-clamped {
    max-height: var(--provider-collapsed-height, 150px);
    overflow: hidden;
}
.catalog-provider-frame.is-clamped::after {
    opacity: 1;
    visibility: visible;
}
.catalog-provider-frame.is-animating {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.catalog-provider-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}
.catalog-provider-grid .catalog-provider {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex: 1 1 auto;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    height: 34px;
    padding: 4px 8px;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    background: var(--surface-raised);
    text-align: left;
}
.catalog-provider-grid .catalog-provider:hover,
.catalog-provider-grid .catalog-provider:focus-visible {
    border-color: var(--primary);
    color: #fff;
}
.catalog-provider-grid .catalog-provider.active {
    border-color: var(--primary);
    background: #173969;
}
.catalog-provider-grid .catalog-provider-logo {
    flex: 0 0 32px;
    width: 32px;
    height: 24px;
    object-fit: contain;
}
.catalog-provider-grid .catalog-provider .provider-mark--compact {
    width: 28px;
    height: 24px;
    border-radius: 6px;
    font-size: 12px;
}
.catalog-provider strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
    font-size: 12px;
    line-height: 1.3;
}
.catalog-provider span {
    font-size: 10px;
    color: #93abc9;
}
.catalog-provider > svg {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
    color: #8cbaff;
}
.catalog-provider-more {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    min-height: 30px;
    margin: 10px auto 0;
    padding: 5px 11px 5px 14px;
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    background: var(--surface-raised);
    box-shadow: 0 6px 18px #00062299;
    color: #9bbef5;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition:
        color 0.2s,
        border-color 0.2s,
        background 0.2s;
}
.catalog-provider-frame.is-clamped + .catalog-provider-more {
    margin-top: -8px;
}
.catalog-provider-more .icon {
    width: 13px;
    height: 13px;
    stroke-width: 2.2;
    transform: rotate(90deg);
    transition: transform 0.25s ease;
}
.catalog-provider-more[aria-expanded='true'] .icon {
    transform: rotate(-90deg);
}
.catalog-provider-more:hover,
.catalog-provider-more:focus-visible {
    color: #fff;
    border-color: var(--primary);
    background: #173969;
}
.catalog-provider-more:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.catalog-provider-more[hidden] {
    display: none;
}
@media (prefers-reduced-motion: reduce) {
    .catalog-provider-frame::after,
    .catalog-provider-frame.is-animating,
    .catalog-provider-more .icon {
        transition: none;
    }
}
.catalog-results {
    scroll-margin-top: 85px;
}
.catalog-result-count {
    margin: 0 0 14px;
    color: #91a8c6;
    font-size: 12px;
}
@media (max-width: 980px) {
    .catalog-page .catalog-filters {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .catalog-search {
        grid-column: 1 / -1;
    }
}
@media (max-width: 600px) {
    .provider-mark--section.provider-mark--image {
        width: 74px;
        height: 40px;
    }
    .catalog-page .catalog-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
        margin-bottom: 10px;
    }
    .catalog-filters .catalog-search {
        grid-column: 1 / -1;
    }
    .catalog-filters .catalog-filter-toggle {
        grid-column: 1;
        grid-row: 2;
    }
    .catalog-filters > [type='submit'] {
        grid-column: 2;
        grid-row: 2;
    }
    .catalog-filter-fields {
        grid-column: 1 / -1;
        grid-row: 3;
        gap: 10px;
    }
    .catalog-page {
        padding: 18px 12px;
    }
    .catalog-page .page-heading {
        margin-bottom: 14px;
        gap: 8px;
    }
    .catalog-page .page-heading p {
        font-size: 11px;
    }
    .catalog-page .catalog-provider-selector {
        margin-bottom: 14px;
    }
    .catalog-filter-chips {
        gap: 6px;
    }
    .catalog-filter-chip {
        padding: 8px 11px;
        font-size: 11px;
    }
    .catalog-provider-grid {
        gap: 5px;
    }
    .catalog-provider-grid .catalog-provider {
        gap: 6px;
        padding: 4px 6px;
    }
    .catalog-provider strong {
        font-size: 11px;
    }
    .game-favorite {
        top: 5px;
        right: 5px;
    }
}
.top-bar .header-search {
    display: flex;
}
.game-search-dialog {
    width: min(960px, calc(100vw - 32px));
    max-width: none;
    max-height: 88dvh;
    margin: 6dvh auto;
    padding: 25px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    background: var(--surface);
    color: #e4eeff;
    box-shadow: 0 24px 100px #0008;
}
.game-search-dialog::backdrop {
    background: #030a1acc;
    backdrop-filter: blur(7px);
}
.game-search-heading,
.game-search-results-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.game-search-heading h2 {
    margin-top: 7px;
    font-size: 24px;
}
.game-search-close {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    height: 36px;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    background: var(--surface-raised);
    color: #d8e8ff;
}
.game-search-form {
    margin: 23px 0;
}
.game-search-form label {
    display: block;
    margin-bottom: 9px;
    font-size: 11px;
    color: #a3b9d8;
}
.game-search-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px 7px 13px;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    background: var(--surface-inset);
}
.game-search-input-row > .icon {
    width: 19px;
    color: #759cd3;
    flex: 0 0 auto;
}
.game-search-input-row input {
    min-width: 0;
    flex: 1;
    height: 35px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #e6efff;
}
.game-search-input-row:focus-within {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 2px #2563eb30;
}
.game-search-results-heading h3 {
    font-size: 16px;
}
.game-search-results-heading a {
    color: #8cb9ff;
    font-size: 11px;
}
.game-search-status {
    min-height: 17px;
    margin: 10px 0 15px;
    font-size: 11px;
    color: #91aacd;
}
.game-search-results {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 13px;
}
.game-search-results .game-card {
    width: 100%;
}
.game-search-footer {
    display: flex;
    justify-content: center;
    margin-top: 21px;
}
@media (max-width: 820px) {
    .game-search-results {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .game-search-dialog {
        width: calc(100vw - 16px);
        margin: 3dvh auto;
        max-height: 94dvh;
        padding: 18px 13px;
        border-radius: 16px;
    }
    .game-search-heading h2 {
        font-size: 19px;
    }
    .game-search-form {
        margin: 18px 0;
    }
    .game-search-results {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
    }
    .game-search-input-row {
        gap: 7px;
        padding-left: 9px;
    }
    .game-search-input-row .button {
        padding: 9px 11px;
        font-size: 11px;
    }
}
@media (max-width: 340px) {
    .game-search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
