.qdeck-market__head-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.qdeck-market__head-actions > button {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    background: #1b2533;
    color: #b9c9dd;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 800;
}

.qdeck-market__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qdeck-market__subscriptions {
    width: 100%;
}

.qdeck-market__subscriptions .qplus-store-offer {
    width: 100%;
    margin-top: 8px;
}

.qdeck-market-card__visual {
    min-height: 220px;
}

.qdeck-market-card__fan {
    position: relative;
    z-index: 2;
    width: 132px;
    height: 170px;
}

.qdeck-market-card__fan i {
    position: absolute;
    top: 7px;
    left: 34px;
    display: block;
    width: 86px;
    height: 132px;
    border: 2px solid rgba(245, 216, 138, .76);
    border-radius: 10px;
    background: linear-gradient(145deg, #202d42, #101723) center / cover no-repeat;
    box-shadow: 0 13px 28px rgba(0, 0, 0, .38);
}

.qdeck-market-card__fan i:nth-child(1) {
    transform: translate(-24px, 13px) rotate(-14deg);
    opacity: .62;
}

.qdeck-market-card__fan i:nth-child(2) {
    transform: translate(20px, 12px) rotate(13deg);
    opacity: .76;
}

.qdeck-market-card__fan i:nth-child(3) {
    transform: translateY(0);
}

.qdeck-market-card:hover .qdeck-market-card__fan i:nth-child(3) {
    transform: translateY(-5px);
    transition: transform .2s ease;
}

.qdeck-market-card .woocommerce-Price-amount {
    white-space: nowrap;
}

.qdeck-market-card__games {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding: 9px 10px;
    border: 1px solid rgba(245, 216, 138, .24);
    border-radius: 11px;
    background: rgba(245, 216, 138, .06);
    color: #cbd5e1;
    font-size: 11px;
}

.qdeck-market-card__games b {
    color: #f5d88a;
}

.qdeck-market-card__games span {
    font-weight: 800;
}

.qdeck-market__empty {
    max-width: 760px;
    margin: 34px auto 70px;
    padding: 48px 24px;
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 24px;
    background: rgba(255, 255, 255, .035);
    color: #fff;
    text-align: center;
}

.qdeck-market__empty > div {
    font-size: 52px;
}

.qdeck-market__empty h3 {
    margin: 14px 0 8px;
    font-size: 25px;
}

.qdeck-market__empty p {
    margin: 0;
    color: #8794a8;
    font-size: 16px;
    line-height: 1.8;
}

html[data-theme="light"] .qdeck-market__head-actions > button {
    border-color: #d7dfeb;
    background: #f5f8fc;
    color: #3d5c82;
}

html[data-theme="light"] .qdeck-market-card__games {
    border-color: #ead7a7;
    background: #fffaf0;
    color: #46556a;
}

html[data-theme="light"] .qdeck-market-card__games b {
    color: #8a5a00;
}

html[data-theme="light"] .qdeck-market__empty {
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, .72);
    color: #172033;
}

.qdeck-skinned-card {
    position: relative !important;
    isolation: isolate;
    overflow: hidden !important;
    border: 2px solid rgba(250, 224, 159, .9) !important;
    background-color: #182233 !important;
    background-position: center !important;
    background-size: cover !important;
    color: #fff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .95);
}

.qdeck-skinned-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(145deg, rgba(0, 0, 0, .64), transparent 37%, transparent 61%, rgba(0, 0, 0, .72));
    pointer-events: none;
}

.qdeck-card-corner {
    position: absolute;
    z-index: 2;
    display: flex;
    min-width: 29%;
    min-height: 27%;
    padding: 3px 4px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 216, 138, .64);
    background: linear-gradient(145deg, rgba(8, 45, 33, .98), rgba(13, 27, 28, .96));
    color: #fff;
    font-size: clamp(.62rem, 4.5vw, .94rem);
    font-weight: 1000;
    line-height: .95;
    box-shadow: 0 4px 11px rgba(0, 0, 0, .28);
}

.qdeck-card-corner.is-top {
    top: 0;
    left: 0;
    border-top: 0;
    border-left: 0;
    border-radius: 0 0 10px 0;
}

.qdeck-card-corner.is-bottom {
    right: 0;
    bottom: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 10px 0 0 0;
    transform: rotate(180deg);
}

.qdeck-skinned-card.is-red .qdeck-card-corner {
    color: #ff9199;
}

.qmadaqesh-reveal__row .qdeck-card-corner {
    font-size: .55rem;
}

.qmadaqesh-reveal__row .qdeck-card-corner.is-top {
    top: 0;
    left: 0;
}

.qmadaqesh-reveal__row .qdeck-card-corner.is-bottom {
    right: 0;
    bottom: 0;
}

.qtv-madaqesh__card.qdeck-skinned-card .qdeck-card-corner {
    font-size: clamp(.58rem, 1vw, .86rem);
}

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

@media (max-width: 760px) {
    .qdeck-market__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .qdeck-market-card__visual {
        min-height: 190px;
    }
    .qdeck-market__head-actions {
        align-items: flex-end;
        flex-direction: column;
    }
}

@media (max-width: 470px) {
    .qdeck-market__grid {
        grid-template-columns: 1fr;
    }
}

.qdeck-market-card__preview-button {
    display: flex;
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    padding: 10px 14px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(245, 216, 138, .36);
    border-radius: 12px;
    background: rgba(245, 216, 138, .08);
    color: #f5d88a;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.qdeck-market-card__preview-button:hover,
.qdeck-market-card__preview-button:focus-visible {
    border-color: rgba(245, 216, 138, .78);
    background: rgba(245, 216, 138, .16);
    outline: none;
}

.qdeck-market-card__preview-button span {
    display: inline-grid;
    min-width: 28px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #f5d88a;
    color: #172033;
    font-size: 12px;
}

html.qdeck-gallery-open {
    overflow: hidden;
}

.qdeck-gallery-modal[hidden] {
    display: none !important;
}

.qdeck-gallery-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(3, 8, 14, .88);
    backdrop-filter: blur(8px);
}

.qdeck-gallery-modal__panel {
    display: flex;
    width: min(1180px, 100%);
    max-height: 92vh;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(245, 216, 138, .28);
    border-radius: 24px;
    background: linear-gradient(160deg, #162334, #0b111b 56%, #111a27);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .6);
    color: #fff;
}

.qdeck-gallery-modal__header {
    position: relative;
    padding: 22px 72px 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.qdeck-gallery-modal__header h2 {
    margin: 0 0 5px;
    color: #fff;
    font-size: clamp(20px, 3vw, 29px);
}

.qdeck-gallery-modal__header p {
    margin: 0;
    color: #aeb9c8;
    line-height: 1.7;
}

.qdeck-gallery-modal__close {
    position: absolute;
    top: 18px;
    right: 20px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    cursor: pointer;
    font: 900 25px/1 sans-serif;
}

.qdeck-gallery-modal__close:hover,
.qdeck-gallery-modal__close:focus-visible {
    border-color: #f5d88a;
    color: #f5d88a;
    outline: none;
}

.qdeck-gallery-modal__grid {
    display: grid;
    overflow: auto;
    padding: 22px;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 16px 12px;
    scrollbar-color: #6c5a2c transparent;
}

.qdeck-preview-card {
    min-width: 0;
    margin: 0;
}

.qdeck-preview-card__surface {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 2px solid rgba(245, 216, 138, .78);
    border-radius: 9px;
    background-color: #182233;
    background-position: center;
    background-size: cover;
    box-shadow: 0 8px 19px rgba(0, 0, 0, .34);
}

.qdeck-preview-card__surface::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(145deg, rgba(0, 0, 0, .58), transparent 38%, transparent 61%, rgba(0, 0, 0, .66));
    content: "";
}

.qdeck-preview-card__corner {
    position: absolute;
    z-index: 2;
    display: flex;
    min-width: 31%;
    min-height: 28%;
    padding: 3px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 216, 138, .64);
    background: linear-gradient(145deg, rgba(8, 45, 33, .99), rgba(13, 27, 28, .97));
    color: #fff;
    font-size: clamp(10px, 1.3vw, 15px);
    font-weight: 1000;
    line-height: .95;
    text-shadow: 0 1px 4px #000;
}

.qdeck-preview-card.is-red .qdeck-preview-card__corner {
    color: #ff9199;
}

.qdeck-preview-card__corner b,
.qdeck-preview-card__corner i {
    font: inherit;
}

.qdeck-preview-card__corner.is-top {
    top: 0;
    left: 0;
    border-top: 0;
    border-left: 0;
    border-radius: 0 0 8px 0;
}

.qdeck-preview-card__corner.is-bottom {
    right: 0;
    bottom: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 8px 0 0;
    transform: rotate(180deg);
}

.qdeck-preview-card figcaption {
    overflow: hidden;
    margin-top: 6px;
    color: #aeb9c8;
    font-size: 11px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="light"] .qdeck-market-card__preview-button {
    border-color: #c9ad68;
    background: #fff9e8;
    color: #725819;
}

@media (max-width: 600px) {
    .qdeck-gallery-modal {
        padding: 8px;
    }

    .qdeck-gallery-modal__panel {
        max-height: 96vh;
        border-radius: 17px;
    }

    .qdeck-gallery-modal__header {
        padding: 17px 58px 14px 16px;
    }

    .qdeck-gallery-modal__close {
        top: 13px;
        right: 13px;
    }

    .qdeck-gallery-modal__grid {
        padding: 14px 10px 20px;
        grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
        gap: 12px 8px;
    }
}
