#card-display-slot {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* 1. Main container for the SVG */
.playing-card {
    width: 120px;
    height: 168px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
}

/* 2. Style the responsive SVG asset directly */
.playing-card img.card-svg-asset {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 3. Small variant for choice grid and results */
.playing-card.is-small {
    width: 72px;
    height: 100px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* --- Choice grid layout engine --- */
.card-choice-grid {
    display: grid;
    /* On narrow mobile devices, use 2 columns with a smaller gap */
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.card-choice-btn {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 10px;
    padding: 0.5rem;
    transition: border-color 0.15s, transform 0.1s;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.card-choice-btn:hover {
    border-color: #3273dc;
    transform: scale(1.02);
}

.card-choice-btn.is-selected {
    border-color: #48c774;
    background: #effaf3;
}
#original-cards-tags .notification {
    margin: 0 !important;
}
/* ==========================================================================
   MOBILE REAL ESTATE OPTIMIZATIONS (Max-width: 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* 1. Force the section to edge-to-edge width */
    .section {
        padding: 0.5rem 0.25rem !important;
        width: 100% !important;
    }

    /* 2. Strip standard margins and bounds from Bulma's structural layout container */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 3. Strip shadows and background borders from the main outer container card
       so it blends seamlessly into the screen background, saving side space */
    .main-card.card {
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
    }

    /* 4. Minimize card wrapper whitespace inner padding */
    .main-card .card-content {
        padding: 0.5rem !important;
    }

    /* 5. Drop button minimum heights so they wrap tightly around the card assets */
    .card-choice-btn {
        min-height: auto;
        padding: 0.25rem;
    }

    /* 6. Shrink HR margins and headers to save vertical text blocks */
    hr {
        margin: 0.5rem 0 !important;
    }

    .title.is-3 {
        font-size: 1.4rem !important;
        margin-bottom: 0.25rem !important;
    }

    .subtitle.is-6 {
        margin-bottom: 0.25rem !important;
    }

    .mb-4, .my-4 {
        margin-bottom: 0.4rem !important;
        margin-top: 0.4rem !important;
    }

    /* 7. Slightly downscale the small card variant if screen is critically narrow */
    .playing-card.is-small {
        width: 64px;
        height: 88px;
    }
    #original-cards-tags .notification {
        margin: 0 !important;
    }
}
/* Desktop spacing adjustment */
@media screen and (min-width: 769px) {
    .card-choice-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}
