body {
    font-family: Arial, sans-serif;
    text-align: center;
    color: #222222;

    margin: 0;
    min-height: 100vh;

    background:
        linear-gradient(
            rgba(25,42,40,.36),
            rgba(25,42,40,.36)
        ),
        url("/images/DISPLAY/ask_background.png")
        center top / cover fixed;

    background-color: #263f3d;
}

/* Page title */
h1,
h2,
h3,
.page-title {
    color: #000000;
    font-size: 2em;
    font-weight: bold;
    text-shadow: none;
    margin-bottom: 20px;
}

/* ===========================
   AVAILABILITY LEGEND
   =========================== */

.rarity-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 10px 26px;

    width: max-content;
    max-width: calc(100% - 30px);

    margin: 16px auto 0;
    padding: 9px 18px;

    box-sizing: border-box;

    border: 1px solid rgba(70, 60, 42, 0.42);
    border-radius: 999px;

    background: rgba(248, 242, 222, 0.92);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        0 3px 8px rgba(0,0,0,0.16);

    color: #29261f;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
}


.rarity-legend-item {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    white-space: nowrap;
}


.rarity-legend-colour {
    display: inline-block;

    width: 26px;
    height: 18px;

    box-sizing: border-box;

    border-radius: 5px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.65),
        0 1px 3px rgba(0,0,0,0.25);
}


/* Matches the green in-stock cards */
.rarity-legend-in-stock {
    background: #BFFFCF;
    border: 1px solid #76C98B;
}


/* Matches the blue reference cards */
.rarity-legend-reference {
    background: #BFDFFF;
    border: 1px solid #7EABD7;
}


@media (max-width: 650px) {

    .rarity-legend {
        width: calc(100% - 24px);

        margin-top: 12px;
        padding: 10px 12px;

        gap: 9px 18px;

        border-radius: 10px;

        font-size: 13px;
    }

}

/* ===========================
   GRID
   =========================== */

.grid {
    display: grid;

    width: 100%;
    box-sizing: border-box;

    grid-template-columns: repeat(7, 180px);

    justify-content: center;

    gap: 20px;

    padding: 20px;
}

/* Large desktop */
@media (max-width: 1500px) {
    .grid {
        grid-template-columns: repeat(6, 180px);
    }
}

/* Desktop */
@media (max-width: 1280px) {
    .grid {
        grid-template-columns: repeat(5, 180px);
    }
}

/* Small desktop / tablet landscape */
@media (max-width: 1080px) {
    .grid {
        grid-template-columns: repeat(4, 180px);
    }
}

/* Tablet */
@media (max-width: 860px) {
    .grid {
        grid-template-columns: repeat(3, 180px);
    }
}

/* Large phone */
@media (max-width: 650px) {
    .grid {
        grid-template-columns: repeat(2, 180px);
    }
}

/* Small phone */
@media (max-width: 430px) {
    .grid {
        grid-template-columns: 180px;
    }
}

.stamp {
    border-radius: 10px;
    padding: 10px;
    position: relative;
    background-color: #444444;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stamp:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

/* In-stock */
.in-stock {
    background: #BFFFCF;
    color: #222222;
}

/* Out-of-stock */
.out-stock {
    background: #BFDFFF;
    color: #222222;
}

.stamp img {
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.stamp-title {
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #222222;
}

.rank-circle {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: #FFFFFF;
    color: #222222;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    line-height: 28px;
    text-align: center;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.qv-link {
    display: inline-block;
    color: #000000;
    text-decoration: underline;
    transition: transform 0.3s ease, color 0.3s ease;
    transform-origin: left center;
}

.qv-link:hover {
    color: darkgreen;
    transform: scale(1.5);
}