body.guess-who-open {
    overflow: hidden;
}

.guess-who[hidden] {
    display: none !important;
}

.guess-who {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    transition: opacity 320ms ease;
}

.guess-who.is-open {
    opacity: 1;
}

.guess-who__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(54, 39, 37, .26);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: default;
}

.guess-who__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    width: min(87vw, 410px);
    max-height: calc(100dvh - 36px);
    padding: 30px 26px 24px;
    overflow-y: auto;
    border: 1px solid rgba(125, 91, 74, .1);
    border-radius: 27px;
    color: #4b3330;
    background: #fff8ec;
    box-shadow: 0 18px 50px rgba(76, 45, 42, .18);
    text-align: center;
    transform: translateY(8px) scale(.985);
    transition: transform 320ms cubic-bezier(.2, .75, .2, 1);
}

.guess-who.is-open .guess-who__dialog {
    transform: translateY(0) scale(1);
}

.guess-who__decor {
    position: absolute;
    color: #d9a89a;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.guess-who__decor--a {
    top: 26px;
    left: 23px;
    font-size: 15px;
}

.guess-who__decor--b {
    top: 70px;
    right: 27px;
    color: #c9b9a3;
    font-size: 27px;
}

.guess-who__title {
    margin: 0;
    color: #4b3330;
    font: 700 26px/1.2 system-ui, sans-serif;
}

.guess-who__subtitle {
    margin: 8px 0 18px;
    color: #9a7d75;
    font: 400 14px/1.5 system-ui, sans-serif;
}

.guess-who__subtitle[hidden] {
    display: none;
}

.guess-who__image-button {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 180px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    outline-offset: 5px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.guess-who__image-button:focus-visible {
    outline: 2px solid #c77b78;
}

.guess-who__image {
    display: block;
    width: auto;
    max-width: 72%;
    max-height: min(43vh, 330px);
    object-fit: contain;
    margin-inline: auto;
    opacity: 1;
    transform: scale(1);
    transition: opacity 190ms ease, transform 190ms ease;
    pointer-events: none;
    -webkit-user-drag: none;
}

.guess-who__image.is-switching {
    opacity: 0;
    transform: scale(.94);
}

.guess-who__image-button[aria-disabled="true"] {
    cursor: default;
}

.guess-who__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    width: 100%;
    margin-top: 18px;
}

.guess-who__actions[hidden] {
    display: none;
}

.guess-who__action {
    min-width: 0;
    min-height: 45px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 15px;
    font: 600 14px/1.2 system-ui, sans-serif;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.guess-who__action:hover {
    transform: translateY(-1px);
}

.guess-who__action:focus-visible {
    outline: 2px solid #9c5958;
    outline-offset: 3px;
}

.guess-who__action--secondary {
    border-color: #e5cbc2;
    color: #604541;
    background: rgba(255, 255, 255, .48);
}

.guess-who__action--primary {
    color: #fffaf4;
    background: #b86a69;
}

@media (max-width: 380px) {
    .guess-who__dialog {
        padding: 27px 22px 22px;
    }

    .guess-who__image-button {
        min-height: 150px;
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    .guess-who {
        place-items: start center;
        padding-block: 10px;
    }

    .guess-who__dialog {
        max-height: calc(100dvh - 20px);
        padding-block: 20px 16px;
    }

    .guess-who__subtitle {
        margin-bottom: 10px;
    }

    .guess-who__image-button {
        min-height: 110px;
    }

    .guess-who__image {
        max-height: 28vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guess-who,
    .guess-who__dialog,
    .guess-who__image,
    .guess-who__action {
        transition: none !important;
    }
}
