/* Play Room gallery + Memory Game overlay chrome */

.playroom-body {
    overflow-x: hidden;
}

.playroom-body.overlay-open {
    overflow: hidden;
}

.playroom-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 24px 70px;
}

.back-home {
    display: inline-block;
    margin-bottom: 28px;
    padding: 12px 24px;
    background: #FFF8F1;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    color: #7A644E;
    font-weight: 600;
    transition: 0.35s;
}

.back-home:hover {
    transform: translateY(-3px);
    color: #B48B43;
}

.playroom-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 28px;
    align-items: stretch;
}

.playroom-game-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #FFF8F1;
    border-radius: 28px;
    overflow: hidden;
    padding: 0;
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.10),
        0 5px 15px rgba(0, 0, 0, 0.05);
}

.playroom-card-image {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
    background: #FFF8F1;
}

.playroom-card-image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    border-radius: 0;
}

.playroom-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 132px;
    padding: 10px 16px 12px;
    box-sizing: border-box;
}

.playroom-game-card h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 22px;
    font-weight: 600;
    color: #4B3D2F;
    margin: 0 0 4px;
    line-height: 1.15;
    min-height: calc(1.15em * 2);
}

.playroom-game-card p {
    color: #756554;
    line-height: 1.35;
    font-size: 13px;
    margin: 0;
    min-height: calc(1.35em * 2);
}

a.playroom-open {
    display: inline-block;
}

.playroom-open {
    border: 0;
    cursor: pointer;
    padding: 7px 16px;
    margin-top: auto;
    align-self: flex-start;
    border-radius: 999px;
    background: #C9A86A;
    color: #3F352C;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.playroom-open:hover {
    background: #B48B43;
    color: #fff;
}

.language a.active {
    color: #B48B43;
    font-weight: 600;
}

.memory-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: #F7F2EA;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 18px 40px;
    max-width: 100%;
}

.memory-overlay-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 920px;
    margin: 0 auto 8px;
    width: 100%;
}

.memory-overlay-langs {
    font-size: 15px;
}

.memory-overlay[hidden] {
    display: none;
}

.memory-close {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 16px;
    border: 0;
    background: #FFF8F1;
    color: #7A644E;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.memory-close span[aria-hidden] {
    font-size: 20px;
    line-height: 1;
}

.memory-close:hover {
    color: #B48B43;
}

html[dir="rtl"] .playroom-page,
html[dir="rtl"] .memory-overlay {
    text-align: right;
}

@media (max-width: 800px) {
    .playroom-gallery {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

@media (max-width: 700px) {
    .playroom-page {
        padding: 4px 16px 48px;
    }

    .header .title h1 {
        font-size: 34px;
    }

    .memory-overlay {
        padding: 12px 10px 32px;
    }
}

/* Phones only: hide SmoothDraw / Draw & Color card (keep page & files) */
@media (max-width: 767px) {
    .playroom-game-card--draw {
        display: none !important;
    }
}
