html.rewards-page-loading #rewards-catalog-grid,
html.rewards-page-loading #rewards-catalog-empty {
    display: none !important;
}

html:not(.rewards-page-loading) #rewards-catalog-skeleton {
    display: none !important;
}

.rewards-clickable {
    cursor: pointer;
}

.rewards-clickable-lift {
    cursor: pointer;
    transition:
        transform 180ms ease,
        filter 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.rewards-clickable-lift:hover {
    transform: translateY(-1px);
}

.rewards-clickable-lift:disabled,
.rewards-clickable:disabled {
    cursor: not-allowed;
    transform: none;
}

.rewards-surface,
.rewards-item-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 10px 34px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rewards-chip-surface {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rewards-collection-chip {
    display: inline-flex;
    height: 36px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0 13px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.rewards-collection-chip:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rewards-collection-chip.is-active {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #07111f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.rewards-collection-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--collection-color, rgba(255, 255, 255, 0.45));
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.rewards-collection-badge {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rewards-item-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
    box-shadow:
        0 14px 38px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.rewards-item-image-well {
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.08), transparent 34%),
        rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 24px rgba(0, 0, 0, 0.14);
}

.rewards-item-card:hover .rewards-item-image-well {
    border-color: rgba(255, 255, 255, 0.11);
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.1), transparent 36%),
        rgba(0, 0, 0, 0.16);
}

.rewards-live-strip {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 14px;
    padding: 8px 10px 8px 14px;
    overflow: hidden;
}

.rewards-live-label {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 14px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.rewards-live-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.9);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

.rewards-live-viewport {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.rewards-live-track {
    display: flex;
    width: max-content;
}

.rewards-live-track.is-animated {
    animation: rewards-live-marquee 46s linear infinite;
}

.rewards-live-strip:hover .rewards-live-track.is-animated {
    animation-play-state: paused;
}

.rewards-live-group {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    padding-right: 10px;
}

.rewards-live-item {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    padding: 5px 10px 5px 5px;
    color: rgba(255, 255, 255, 0.76);
    white-space: nowrap;
}

.rewards-live-avatar,
.rewards-live-reward-image {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.18);
}

.rewards-live-avatar {
    object-fit: cover;
}

.rewards-live-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.44);
}

.rewards-live-reward-image {
    border-radius: 10px;
    object-fit: contain;
    padding: 3px;
}

.rewards-live-player {
    max-width: 118px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
}

.rewards-live-action {
    color: rgba(255, 255, 255, 0.38);
    font-size: 12px;
    font-weight: 700;
}

.rewards-live-reward-name {
    max-width: 160px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
}

@keyframes rewards-live-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.reward-quest-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(96px, auto);
    grid-auto-flow: dense;
    gap: 12px;
}

.reward-quest-card {
    --quest-bg: linear-gradient(135deg, #278cff 0%, #2aa4ff 100%);
    --quest-button: rgba(190, 238, 128, 0.92);
    --quest-button-text: #183512;
    --quest-art-size: 52%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 126px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--quest-bg);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
        transform 180ms ease,
        filter 180ms ease,
        box-shadow 180ms ease;
}

.reward-quest-card:hover {
    transform: translateY(-2px);
    filter: saturate(1.04) brightness(1.03);
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.reward-quest-card:nth-child(6n + 1) {
    --quest-bg: linear-gradient(135deg, #1688ff 0%, #37a6ff 100%);
    --quest-button: rgba(179, 234, 120, 0.95);
    --quest-button-text: #173613;
    --quest-art-size: 55%;
}

.reward-quest-card:nth-child(6n + 2) {
    --quest-bg: linear-gradient(135deg, #9d255d 0%, #d247b8 100%);
    --quest-button: rgba(176, 224, 121, 0.94);
    --quest-button-text: #203912;
    --quest-art-size: 44%;
}

.reward-quest-card:nth-child(6n + 3) {
    --quest-bg: linear-gradient(135deg, #c95725 0%, #d78038 100%);
    --quest-button: rgba(187, 229, 105, 0.94);
    --quest-button-text: #2d3511;
    --quest-art-size: 45%;
}

.reward-quest-card:nth-child(6n + 4) {
    --quest-bg: linear-gradient(135deg, #41c944 0%, #5bd858 100%);
    --quest-button: rgba(221, 255, 201, 0.78);
    --quest-button-text: #164a19;
    --quest-art-size: 48%;
}

.reward-quest-card:nth-child(6n + 5) {
    --quest-bg: linear-gradient(135deg, #7b3df0 0%, #9d55f2 100%);
    --quest-button: rgba(241, 231, 255, 0.78);
    --quest-button-text: #3b246f;
    --quest-art-size: 50%;
}

.reward-quest-card:nth-child(6n) {
    --quest-bg: linear-gradient(135deg, #2fa335 0%, #61c84b 100%);
    --quest-button: rgba(235, 255, 210, 0.82);
    --quest-button-text: #164514;
    --quest-art-size: 50%;
}

.reward-quest-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 62%),
        radial-gradient(circle at 88% 50%, rgba(255, 255, 255, 0.2), transparent 34%);
    opacity: .75;
}

.reward-quest-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.12));
    opacity: .42;
}

.reward-quest-timer {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(5, 8, 14, 0.38);
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.reward-quest-timer span {
    color: rgba(255, 255, 255, 0.58);
    font-weight: 800;
}

.reward-quest-card--mini {
    --quest-art-size: 44%;
    grid-column: span 1;
    grid-row: span 1;
}

.reward-quest-card--mini.reward-quest-card--no-description {
    align-self: start;
    height: 96px;
    min-height: 96px;
}

.reward-quest-card--compact {
    grid-column: span 2;
    grid-row: span 1;
}

.reward-quest-card--wide {
    grid-column: span 3;
    grid-row: span 1;
}

.reward-quest-card--spotlight,
.reward-quest-card--large {
    grid-column: span 3;
    grid-row: span 2;
    min-height: 264px;
}

.reward-quest-card--spotlight,
.reward-quest-card--large {
    --quest-art-size: 62%;
}

.reward-quest-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 100%;
    max-width: 68%;
    flex-direction: column;
    padding: 14px;
    color: #fff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.16);
}

.reward-quest-card--wide .reward-quest-content,
.reward-quest-card--spotlight .reward-quest-content,
.reward-quest-card--large .reward-quest-content {
    max-width: 58%;
}

.reward-quest-card--mini .reward-quest-content {
    max-width: none;
    padding: 10px;
}

.reward-quest-card--mini.reward-quest-card--no-description .reward-quest-content {
    min-height: 96px;
    padding: 9px;
}

.reward-quest-card--mini .reward-quest-meta {
    max-width: calc(100% - 48px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 9px;
    letter-spacing: .1em;
}

.reward-quest-title {
    font-size: 18px;
    font-weight: 900;
    line-height: .95;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.reward-quest-card--spotlight .reward-quest-title,
.reward-quest-card--large .reward-quest-title {
    font-size: 28px;
}

.reward-quest-card--mini .reward-quest-title {
    display: -webkit-box;
    max-width: 78%;
    overflow: hidden;
    font-size: 13px;
    line-height: .98;
    letter-spacing: -0.025em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.reward-quest-card--mini.reward-quest-card--no-description .reward-quest-title {
    max-width: calc(100% - 48px);
    font-size: 12px;
    line-height: 1;
}

.reward-quest-copy {
    margin-top: 6px;
    display: -webkit-box;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.reward-quest-card--mini .reward-quest-copy {
    display: none;
}

.reward-quest-art {
    position: absolute;
    right: 0;
    top: 50%;
    z-index: 1;
    width: var(--quest-art-size);
    height: 105%;
    object-fit: contain;
    object-position: center right;
    transform: translate(8%, -50%);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.24));
    pointer-events: none;
    user-select: none;
}

.reward-quest-card--compact .reward-quest-art {
    width: 46%;
    height: 86%;
    transform: translate(14%, -42%);
    top: 60%;
}

.reward-quest-card--mini .reward-quest-art {
    top: auto;
    right: -8px;
    bottom: 30px;
    width: 62px;
    height: 62px;
    object-position: center;
    opacity: .92;
    transform: none;
}

.reward-quest-card--mini.reward-quest-card--no-description .reward-quest-art {
    right: -6px;
    bottom: 27px;
    width: 50px;
    height: 50px;
}

.reward-quest-fallback-art {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    display: flex;
    height: 72px;
    width: 72px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    transform: rotate(-6deg);
}

.reward-quest-card--mini .reward-quest-fallback-art {
    right: 8px;
    bottom: 36px;
    height: 42px;
    width: 42px;
    border-radius: 12px;
    font-size: 7px;
    letter-spacing: .08em;
}

.reward-quest-card--mini.reward-quest-card--no-description .reward-quest-fallback-art {
    right: 7px;
    bottom: 31px;
    height: 36px;
    width: 36px;
}

.reward-quest-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
}

.reward-quest-card--mini .reward-quest-footer {
    gap: 5px;
    padding-top: 6px;
}

.reward-quest-card--mini.reward-quest-card--no-description .reward-quest-footer {
    padding-top: 4px;
}

.reward-quest-button {
    display: inline-flex;
    height: 28px;
    min-width: 92px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--quest-button);
    padding: 0 12px;
    color: var(--quest-button-text);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    transition: transform 160ms ease, filter 160ms ease;
}

.reward-quest-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.reward-quest-button:disabled {
    cursor: default;
    opacity: .72;
    transform: none;
}

.reward-quest-card--mini .reward-quest-button {
    height: 24px;
    min-width: 56px;
    border-radius: 4px;
    padding: 0 7px;
    font-size: 9px;
}

.reward-quest-progress {
    min-width: 74px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    padding: 7px 9px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.reward-quest-card--mini .reward-quest-progress {
    min-width: 42px;
    max-width: 54px;
    overflow: hidden;
    padding: 6px 6px;
    font-size: 9px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.reward-quest-card--mini .reward-quest-timer {
    top: 7px;
    right: 7px;
    padding: 5px 6px;
    font-size: 9px;
}

.reward-quest-card--mini.reward-quest-card--no-description .reward-quest-timer {
    top: 6px;
    right: 6px;
}

.reward-quest-progress-line {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    height: 3px;
    background: rgba(0, 0, 0, 0.16);
}

.reward-quest-progress-line > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 1023px) {
    .reward-quest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(150px, auto);
    }

    .reward-quest-card--compact,
    .reward-quest-card--mini,
    .reward-quest-card--wide,
    .reward-quest-card--spotlight,
    .reward-quest-card--large {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 154px;
    }

    .reward-quest-content,
    .reward-quest-card--mini .reward-quest-content,
    .reward-quest-card--wide .reward-quest-content,
    .reward-quest-card--spotlight .reward-quest-content,
    .reward-quest-card--large .reward-quest-content {
        max-width: 64%;
    }

    .reward-quest-card--spotlight .reward-quest-title,
    .reward-quest-card--large .reward-quest-title {
        font-size: 20px;
    }
}

@media (max-width: 639px) {
    .rewards-live-strip {
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px;
    }

    .rewards-live-label {
        border-right: 0;
        padding-right: 0;
    }

    .rewards-live-viewport {
        overflow-x: auto;
        mask-image: none;
        scrollbar-width: none;
    }

    .rewards-live-viewport::-webkit-scrollbar {
        display: none;
    }

    .rewards-live-track.is-animated {
        animation: none;
    }

    .rewards-live-track > [aria-hidden="true"] {
        display: none;
    }

    .reward-quest-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .reward-quest-card,
    .reward-quest-card--mini,
    .reward-quest-card--compact,
    .reward-quest-card--wide,
    .reward-quest-card--spotlight,
    .reward-quest-card--large {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 154px;
    }

    .reward-quest-content,
    .reward-quest-card--mini .reward-quest-content,
    .reward-quest-card--wide .reward-quest-content,
    .reward-quest-card--spotlight .reward-quest-content,
    .reward-quest-card--large .reward-quest-content {
        max-width: 66%;
    }

    .reward-quest-card--mini .reward-quest-title {
        max-width: 100%;
        font-size: 18px;
    }

    .reward-quest-card--mini .reward-quest-copy {
        display: -webkit-box;
    }

    .reward-quest-card--mini .reward-quest-art {
        top: 50%;
        right: 0;
        bottom: auto;
        width: 48%;
        height: 88%;
        object-position: center right;
        transform: translate(8%, -50%);
    }

    .reward-quest-art {
        width: 48%;
        height: 88%;
    }
}

body.public-bg-light .rewards-surface,
body.public-bg-light .rewards-item-card {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.28);
    box-shadow:
        0 10px 34px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.public-bg-light .rewards-chip-surface {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.public-bg-light .rewards-item-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.32);
    box-shadow:
        0 14px 38px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body.public-bg-light .rewards-item-image-well {
    border-color: rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.1), transparent 34%),
        rgba(15, 23, 42, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 24px rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .rewards-live-track.is-animated {
        animation: none;
    }

    .rewards-live-track > [aria-hidden="true"] {
        display: none;
    }
}
