/* 业务聚合页 — 对齐 U4N_NEW_SELLER/game-coins.html */

.aggregate {
    --ag-red: var(--color-brand, #e83b30);
    --ag-red-dark: var(--color-brand-dark, #c92f25);
    --ag-soft: var(--color-brand-soft, #fff1ef);
    --ag-ink: var(--color-foreground, #17191d);
    --ag-muted: var(--color-muted-foreground, #707887);
    --ag-line: var(--color-border, #dfe3e8);
    position: relative;
    color: var(--ag-ink);
    background: var(--color-muted, #f5f6f8);
    padding: 1.625rem 0 4rem;
}

.aggregate-wrap {
    width: 100%;
    max-width: var(--max-width-mall, 1440px);
    margin-inline: auto;
    padding-inline: var(--spacing-gutter, 1.25rem);
}

.aggregate-switcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: 0.75rem;
    margin-bottom: 1.125rem;
}

.aggregate-tab {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.6875rem;
    padding: 0.8125rem 0.875rem;
    border: 1px solid var(--ag-line);
    border-radius: 0.8125rem;
    background: var(--color-card, #fff);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
    color: var(--ag-ink);
    text-decoration: none;
    text-align: left;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.aggregate-tab:hover {
    border-color: #c8cdd4;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(22, 28, 38, 0.08);
    color: var(--ag-ink);
}

.aggregate-tab-ico {
    width: 2.6875rem;
    height: 2.6875rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0.6875rem;
    background: #f0f2f4;
}

.aggregate-tab-ico img {
    width: 1.5625rem;
    height: 1.5625rem;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.72;
}

.aggregate-tab-copy {
    min-width: 0;
}

.aggregate-tab-copy b {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
}

.aggregate-tab-copy small {
    display: block;
    margin-top: 0.125rem;
    color: var(--ag-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aggregate-tab.is-active {
    border-color: #f0b4af;
    background: linear-gradient(135deg, #fff, #fff4f2);
}

.aggregate-tab.is-active .aggregate-tab-ico {
    background: var(--ag-red);
}

.aggregate-tab.is-active .aggregate-tab-ico img {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.aggregate-tab.is-active b {
    color: var(--ag-red);
}

.aggregate-card {
    overflow: visible;
    border: 1px solid var(--ag-line);
    border-radius: 1.125rem;
    background: var(--color-card, #fff);
    box-shadow: 0 12px 36px rgba(22, 28, 38, 0.06);
}

.aggregate-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5625rem;
    padding: 1.625rem 1.75rem 1.375rem;
    border-bottom: 1px solid #e7e9ec;
    background: linear-gradient(135deg, #fff 0%, #fff 64%, #fff5f3 100%);
    border-radius: 1.125rem 1.125rem 0 0;
}

.aggregate-eyebrow {
    display: block;
    margin-bottom: 0.4375rem;
    color: var(--ag-red);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.aggregate-heading h1 {
    margin: 0;
    font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.1875rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
    font-weight: 800;
}

.aggregate-heading p {
    max-width: 60rem;
    margin: 0.4375rem 0 0;
    color: var(--ag-muted);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.aggregate-summary {
    display: grid;
    grid-template-columns: auto auto 1px auto auto;
    align-items: baseline;
    gap: 0.3125rem 0.4375rem;
    padding: 0.75rem 0.9375rem;
    border: 1px solid #eadedc;
    border-radius: 0.6875rem;
    background: #fff;
    white-space: nowrap;
}

.aggregate-summary strong {
    font-size: 1.125rem;
    padding-left: 1rem;
}

.aggregate-summary span {
    color: var(--ag-muted);
    font-size: 0.75rem;
}

.aggregate-summary i {
    width: 1px;
    height: 1.625rem;
    margin: 0 0.4375rem;
    background: #e6e8eb;
    align-self: center;
}

.aggregate-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13.75rem;
    gap: 0.8125rem;
    padding: 1.25rem 1.75rem 0.875rem;
}

.aggregate-search {
    height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 0.8125rem;
    border: 1px solid #bfc5cd;
    border-radius: 0.625rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aggregate-search:focus-within {
    border-color: #838b96;
    box-shadow: 0 0 0 3px rgba(74, 83, 96, 0.08);
}

.aggregate-search svg {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    color: #7d8591;
}

.aggregate-search input {
    min-width: 0;
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ag-ink);
    font-size: 0.875rem;
}

/* 隐藏浏览器原生 search 清除钮，只留自定义 .aggregate-search-clear */
.aggregate-search input[type="search"]::-webkit-search-decoration,
.aggregate-search input[type="search"]::-webkit-search-cancel-button,
.aggregate-search input[type="search"]::-webkit-search-results-button,
.aggregate-search input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.aggregate-search input::placeholder {
    color: #9299a3;
}

.aggregate-search-clear {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f0f2f4;
    color: #6f7782;
    font-size: 1.1875rem;
    line-height: 1;
    cursor: pointer;
}

.aggregate-sort {
    position: relative;
}

.aggregate-sort-label {
    position: absolute;
    z-index: 2;
    left: 0.8125rem;
    top: 0.3125rem;
    color: #8a919b;
    font-size: 0.75rem;
    pointer-events: none;
}

.aggregate-sort-btn {
    width: 100%;
    height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9375rem 0.75rem 0.1875rem;
    border: 1px solid #bfc5cd;
    border-radius: 0.625rem;
    background: #fff;
    color: var(--ag-ink);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
}

.aggregate-sort-btn > svg:first-child {
    width: 1.125rem;
    height: 1.125rem;
    color: #747d89;
}

.aggregate-sort-btn span {
    flex: 1;
    text-align: left;
}

.aggregate-sort-caret {
    width: 0.6875rem;
    height: 0.6875rem;
    transition: transform 0.15s ease;
}

.aggregate-sort-btn[aria-expanded="true"] .aggregate-sort-caret {
    transform: rotate(180deg);
}

.aggregate-sort-menu {
    position: absolute;
    right: 0;
    top: 3.4375rem;
    z-index: 20;
    width: 100%;
    overflow: hidden;
    padding: 0.375rem;
    border: 1px solid var(--ag-line);
    border-radius: 0.6875rem;
    background: #fff;
    box-shadow: 0 16px 34px rgba(20, 25, 35, 0.16);
}

.aggregate-sort-menu button {
    width: 100%;
    padding: 0.625rem;
    border: 0;
    border-radius: 0.4375rem;
    background: transparent;
    text-align: left;
    font-size: 0.8125rem;
    cursor: pointer;
}

.aggregate-sort-menu button:hover {
    background: #f5f6f8;
}

.aggregate-sort-menu button[aria-selected="true"] {
    background: var(--ag-soft);
    color: var(--ag-red);
    font-weight: 800;
}

.aggregate-az {
    display: grid;
    grid-template-columns: 9.6875rem minmax(0, 1fr);
    gap: 0.875rem;
    align-items: center;
    margin: 0 1.75rem;
    padding: 0.875rem 0 1.0625rem;
    border-bottom: 1px solid #e8eaed;
}

.aggregate-az-label span {
    display: block;
    font-size: 0.8125rem;
    font-weight: 800;
}

.aggregate-az-label small {
    display: block;
    margin-top: 0.125rem;
    color: var(--ag-muted);
    font-size: 0.75rem;
}

.aggregate-az-keys {
    min-width: 0;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding: 0.125rem 0.0625rem 0.3125rem;
    scrollbar-width: thin;
}

.aggregate-az-keys button {
    min-width: 1.9375rem;
    height: 1.9375rem;
    flex: 1 0 1.9375rem;
    padding: 0;
    border: 1px solid #d7dbe1;
    border-radius: 0.4375rem;
    background: #fff;
    color: #535b67;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.aggregate-az-keys button:first-child {
    min-width: 2.75rem;
    flex-basis: 2.75rem;
}

.aggregate-az-keys button:hover:not(:disabled) {
    border-color: #f09b94;
    color: var(--ag-red);
}

.aggregate-az-keys button[aria-pressed="true"] {
    border-color: var(--ag-red);
    background: var(--ag-red);
    color: #fff;
}

.aggregate-az-keys button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.aggregate-results-head {
    min-height: 3.3125rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 0.6875rem 1.75rem;
}

.aggregate-results-head p {
    margin: 0;
    color: var(--ag-muted);
    font-size: 0.8125rem;
}

.aggregate-results-head p strong {
    color: var(--ag-ink);
}

.aggregate-reset {
    padding: 0.375rem 0.5625rem;
    border: 0;
    border-radius: 0.4375rem;
    background: var(--ag-soft);
    color: var(--ag-red);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.aggregate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6875rem;
    padding: 0 1.75rem 1.875rem;
}

.aggregate-game {
    position: relative;
    min-width: 0;
    min-height: 5.25rem;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: 0.625rem;
    align-items: center;
    padding: 0.8125rem 0.875rem;
    border: 1px solid #e0e3e7;
    border-radius: 0.6875rem;
    background: #f8f9fa;
    color: var(--ag-ink);
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.aggregate-game:hover {
    z-index: 1;
    border-color: #efaaa5;
    background: #fff;
    box-shadow: 0 12px 25px rgba(30, 36, 46, 0.11);
    transform: translateY(-2px);
    color: var(--ag-ink);
}

.aggregate-game.is-hidden {
    display: none;
}

.aggregate-game-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border: 1px solid #ead7d5;
    border-radius: 0.625rem;
    background: #fff;
    color: var(--ag-red);
    font-size: 0.875rem;
    font-weight: 900;
}

.aggregate-game-copy {
    min-width: 0;
}

.aggregate-game-copy b {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.8125rem;
    line-height: 1.35;
    font-weight: 700;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.aggregate-game-offers {
    align-self: center;
    padding: 0.25rem 0.4375rem;
    border: 1px solid #f2d4d1;
    border-radius: 0.4375rem;
    background: #fff1ef;
    color: #6b5351;
    font-size: 0.75rem;
    white-space: nowrap;
}

.aggregate-game-offers strong {
    color: #403635;
}

.aggregate-game-arrow {
    position: absolute;
    right: 0.75rem;
    bottom: 0.625rem;
    width: 0.9375rem;
    height: 0.9375rem;
    color: #a0a6af;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.aggregate-game:hover .aggregate-game-arrow {
    opacity: 1;
    transform: none;
}

.aggregate-empty {
    margin: 0 1.75rem 1.875rem;
    padding: 2.875rem 1.25rem;
    border: 1px dashed #ccd1d8;
    border-radius: 0.75rem;
    background: #fafbfc;
    text-align: center;
}

.aggregate-empty > span {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    margin: auto;
    border-radius: 50%;
    background: #eceff3;
    color: #7c8591;
    font-size: 1.3125rem;
    font-weight: 800;
}

.aggregate-empty h2 {
    margin: 0.75rem 0 0.25rem;
    font-size: 1.0625rem;
}

.aggregate-empty p {
    margin: 0;
    color: var(--ag-muted);
    font-size: 0.8125rem;
}

.aggregate-empty-btn {
    display: inline-block;
    margin-top: 0.875rem;
    padding: 0.5rem 0.8125rem;
    border: 1px solid #c4cad2;
    border-radius: 0.5rem;
    background: #fff;
    color: var(--ag-ink);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

@media (min-width: 1650px) {
    .aggregate-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .aggregate-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .aggregate-az {
        grid-template-columns: 1fr;
    }

    .aggregate-az-label small {
        display: none;
    }
}

@media (max-width: 780px) {
    .aggregate {
        padding-top: 1rem;
    }

    .aggregate-switcher {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.3125rem;
    }

    .aggregate-tab {
        min-width: 9.6875rem;
        padding: 0.625rem;
    }

    .aggregate-tab-ico {
        width: 2.375rem;
        height: 2.375rem;
    }

    .aggregate-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.3125rem 1.125rem 1.0625rem;
    }

    .aggregate-summary {
        width: 100%;
        justify-content: start;
    }

    .aggregate-controls {
        grid-template-columns: 1fr;
        padding: 0.9375rem 1.125rem 0.6875rem;
    }

    .aggregate-az {
        margin: 0 1.125rem;
        padding-top: 0.5625rem;
    }

    .aggregate-az-label {
        display: none;
    }

    .aggregate-results-head {
        padding-inline: 1.125rem;
    }

    .aggregate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        padding: 0 1.125rem 1.375rem;
    }

    .aggregate-game {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        min-height: 5.5rem;
        padding: 0.6875rem;
    }

    .aggregate-game-mark {
        width: 2.25rem;
        height: 2.25rem;
    }

    .aggregate-game-offers {
        grid-column: 2;
        justify-self: start;
    }

    .aggregate-game-arrow {
        display: none;
    }

    .aggregate-empty {
        margin-inline: 1.125rem;
    }
}

@media (max-width: 520px) {
    .aggregate-grid {
        grid-template-columns: 1fr;
    }

    .aggregate-game {
        min-height: 4.75rem;
        grid-template-columns: 2.375rem minmax(0, 1fr) auto;
    }

    .aggregate-game-offers {
        grid-column: auto;
        justify-self: auto;
    }
}
