/* Ciudad ilustrada: imágenes propias, iguales en todos los dispositivos. */
.matching-board--city {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}
.matching-board--city .matching-column {
    min-width: 0;
    gap: 12px;
}
.matching-board--city .match-word--city,
.matching-board--city .match-icon--city {
    position: relative;
    min-width: 0;
    min-height: 124px;
    height: 124px;
    border: 2px solid #dce8e1;
    border-radius: 20px;
}
.matching-board--city .match-word--city {
    padding: 12px 20px;
    overflow-wrap: anywhere;
    line-height: 1.35;
    font-size: clamp(14px, 2.2vw, 18px);
}
.matching-board--city .match-icon--city {
    padding: 6px;
    background: #fff;
}
.match-city-illustration {
    display: block;
    width: 156px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    border-radius: 14px;
    pointer-events: none;
}
.matching-board--city .match-word--city.selected {
    border-color: #d5a419;
    box-shadow: 0 0 0 3px #fff1ba;
    background: #fff8df;
}
.matching-board--city .matched {
    opacity: 1;
    background: #eaf7ed;
    border-color: #82b696;
    transform: none;
}
.matching-board--city .matched::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #226c4d;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}
.matching-board--city button:focus-visible,
.puzzle-piece:focus-visible {
    outline: 4px solid #185472;
    outline-offset: 3px;
}
.matching-progress {
    max-width: 960px;
    margin: 0 auto 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #eff7f2;
    color: #245e44;
    font-size: 14px;
    font-weight: 800;
}

/* El cierre del rompecabezas revela la foto completa y su título cargado. */
.kids-puzzle {
    grid-template-rows: repeat(var(--grid), minmax(0, 1fr));
}
.puzzle-piece {
    min-height: 0;
    padding: 0;
}
.puzzle-piece:focus-visible {
    outline-offset: -4px;
}
.puzzle-piece:disabled {
    opacity: 1;
    cursor: default;
}
.kids-puzzle-side img {
    height: auto;
    object-fit: contain;
}
.kids-puzzle-side > span {
    grid-column: 1 / -1;
}
.kids-puzzle-wrap[hidden],
.puzzle-discovery[hidden] {
    display: none !important;
}
.puzzle-discovery {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, .85fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid #cfe4d5;
    border-radius: 24px;
    background: #f3faf4;
}
.puzzle-discovery:focus-visible {
    outline: 4px solid #185472;
    outline-offset: 4px;
}
.puzzle-discovery-photo {
    display: flex;
    align-items: center;
    padding: 16px;
}
.puzzle-discovery-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: contain;
}
.puzzle-discovery-copy {
    padding: 24px 24px 24px 10px;
}
.puzzle-discovery-copy .eyebrow {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.5;
}
.puzzle-discovery-copy h3 {
    margin: 0 0 12px;
    color: #235b42;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.12;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}
.puzzle-discovery-copy > p:not(.eyebrow) {
    color: #486252;
    font-size: 15px;
    line-height: 1.6;
}
.puzzle-discovery-copy .puzzle-discovery-stat {
    font-weight: 800;
}
.puzzle-discovery-copy .secondary-button {
    margin-top: 6px;
}
@media (max-width: 700px) {
    .puzzle-discovery {
        grid-template-columns: minmax(0, 1fr);
    }
    .puzzle-discovery-copy {
        padding: 8px 20px 24px;
    }
}
@media (max-width: 620px) {
    .matching-board--city {
        gap: 10px;
    }
    .matching-board--city .matching-column {
        gap: 9px;
    }
    .matching-board--city .match-word--city,
    .matching-board--city .match-icon--city {
        min-height: 108px;
        height: 108px;
        border-radius: 16px;
    }
    .matching-board--city .match-word--city {
        padding: 12px;
        font-size: 14px;
        letter-spacing: 0;
    }
    .match-city-illustration {
        width: 136px;
    }
}
