    body {
        font-family: system-ui, Segoe UI, Roboto, Arial;
        background: #0b0b0d;
        color: #e6eef8;
        margin: 0
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 2px;
        margin-top: 2px;
        align-items: start
    }

    /* card fills the grid cell and stacks content vertically */
    .card {
        background: transparent;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        gap: 6px;
        box-sizing: border-box;
        width: 100%
    }

    /* images scale to the column width but keep aspect ratio */
    .img-wrap {
        position: relative;
        display: block;
        width: 100%
    }

    img {
        display: block;
        width: 100%;
        height: auto;
        max-width: 100%;
        border-radius: 0
    }
    img:hover{
        filter: brightness(1.1);
    }
    /* ensure badge never overflows small images: allow it to shrink and ellipsize */
    .overlay-badge {
        position: absolute;
        right: 6px;
        top: 6px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        color: #fff;
        padding: 4px 8px;
        border-radius: 999px;
        font-weight: 700;
        font-size: 12px;
        max-width: 60%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .title {
        font-weight: 300;
        font-size: 14px;
        line-height: 1.2;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-left: 4px;
    }

    .small {
        font-size: 12px;
        color: #98a0b3;
        margin: 0
    }

    .meta {
        display: flex;
        justify-content: space-between;
        align-items: center
    }

    /* two columns on small screens */
    @media (max-width:520px) {
        .grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }