.site-theme.playing.pairs-game .pairs-layout {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(48px, 10vw, 150px);
    padding: clamp(20px, 3vw, 36px);
    background: linear-gradient(150deg, #d6ece4, #edf2dd);
    border: 4px solid #fffdf5;
    border-radius: 32px;
    box-shadow: 0 8px 24px #5260480c;
}
.site-theme.playing.pairs-game .pair-column {
    position: relative;
    z-index: 1;
    gap: clamp(14px, 2vh, 24px);
    grid-auto-rows: minmax(64px, 1fr);
}
.site-theme.playing.pairs-game .pair-card {
    overflow: visible;
    min-width: 0;
    border: 3px solid #e6dfce;
    border-radius: clamp(18px, 3vw, 28px);
    background: #fffdf5;
    background-image: linear-gradient(#fffef9, #faf5e7);
    color: #425e53;
    box-shadow: inset 0 2px 0 #fff, 0 5px 0 #b7c8ac;
    transform: none;
    transition: background-color .18s, border-color .18s, box-shadow .18s;
    font-size: clamp(20px, 3vw, 36px);
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
}
.site-theme.playing.pairs-game .pair-card::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #afc6a3;
    border: 3px solid #f6faed;
    top: calc(50% - 8px);
}
.site-theme.playing.pairs-game .pair-word::before { right: -10px; }
.site-theme.playing.pairs-game .pair-picture::before { left: -10px; }
.site-theme.playing.pairs-game .pair-card:hover:not(:disabled) {
    border-color: #abc49a;
    box-shadow: inset 0 2px 0 #fff, 0 5px 0 #9eb68f;
}
.site-theme.playing.pairs-game .pair-card.selected {
    background: #fff0c5;
    border-color: #dfb76b;
    box-shadow: inset 0 2px 0 #fff8de, 0 5px 0 #c4a260, 0 0 0 3px #f5d99e;
}
.site-theme.playing.pairs-game .pair-card.matched {
    background: #e6f3df;
    border-color: #a0be8f;
    box-shadow: inset 0 2px 0 #f4fbea, 0 4px 0 #a6bf96;
    opacity: 1;
}
.site-theme.playing.pairs-game .pair-card.matched::before { background: #6f9c76; }
.site-theme.playing.pairs-game .pair-card.matched::after { content: none; }
.site-theme.playing.pairs-game .pair-card.wrong {
    background: #ffe9dd;
    border-color: #d99a7e;
    box-shadow: 0 4px 0 #c79c84;
}
.site-theme.playing.pairs-game .pair-picture img {
    width: 85%;
    height: 85%;
    max-height: 155px;
    object-fit: contain;
    filter: drop-shadow(0 4px 2px #54744412);
}
.site-theme.playing.pairs-game .pair-connections {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 0;
}
.pair-connections path {
    fill: none;
    stroke: #6f9c76;
    stroke-width: 4;
    stroke-linecap: round;
}
@media (max-width: 600px) {
    .site-theme.playing.pairs-game .pairs-layout {
        padding: 20px 14px;
        gap: 48px;
        border-radius: 26px;
    }
    .site-theme.playing.pairs-game .pair-card { padding: 8px; }
}
.site-theme.playing.pairs-game .pairs-layout .pair-column {
    min-height: 0;
    grid-template-rows: repeat(4, minmax(0, 1fr));
}
.site-theme.playing.pairs-game .pair-picture img {
    position: absolute;
    inset: 8%;
    width: 84%;
    height: 84%;
    max-height: none;
}
