* {
    box-sizing: border-box;
}



.match_page {
    min-height: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    margin: 0;
    height: auto;
}

.match_email_box,
.match_results {
    width: min(440px, 94vw);
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .14);
}

.match_email_box {
    text-align: left !important;
    width: min(840px, 94vw);
    position: relative;
}

.match_lang_switch {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: -8px 0 12px;
}

.match_lang_switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 5px;
    background: #10202f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
}

.match_lang_switch a:hover {
    background: #ac933e;
    color: #fff;
}

.match_email_box h1,
.match_results h1 {
    margin: 0 0 22px;
    font-size: 30px;
}

.match_email_box h1 {
    text-align: center !important;
}

.match_email_box p {
    margin: 0 0 14px;
    line-height: 1.45;
}

.match_legal_text {
    margin-top: 8px;
    font-size: 10px;
    line-height: 2;
}

.match_more_info_button {
    width: auto !important;
    min-height: 0 !important;
    margin: 4px 0 12px 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #10202f !important;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.match_more_info_button:hover {
    background: transparent !important;
    color: #ac933e !important;
}

.match_more_info_text {
    margin: 0 0 16px 0;
    padding: 10px 12px;
    border-left: 3px solid #ac933e;
    background: #f8f6f1;
    color: #222;
    font-size: 10px;
    line-height: 1.75;
}

.match_checkbox_row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
}

.match_checkbox_row input[type="checkbox"] {
    width: 21px;
    height: 21px;
    min-height: 0;
    flex: 0 0 21px;
    padding: 0;
    margin: 0;
}

.match_checkbox_row label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.match_index_actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
}

.match_start_button,
.match_index_actions .match_admin_link {
    width: auto;
    min-width: 118px;
    min-height: 50px;
    margin: 0;
    border: 0;
    border-radius: 6px;
    background: #f05257;
    color: #fff;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.match_start_button:hover,
.match_index_actions .match_admin_link:hover {
    background: #b42828;
    color: #fff;
}

.match_email_box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.match_email_box input {
    width: 100%;
    height: 48px;
    border: 1px solid #c9c5bd;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 16px;
}

.match_email_box button,
.match_restart {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
    border: 0;
    border-radius: 6px;
    background: #f05257;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.match_email_box button:hover,
.match_restart:hover {
    background: #b42828;
    color: #fff;
}

.match_email_box .match_start_button {
    width: auto;
    min-width: 118px;
    min-height: 50px;
    margin: 0;
    padding: 0 20px;
}

.match_email_box .match_start_button:hover {
    background: #b42828;
    color: #fff;
}

.match_quiz_screen {
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 0 48px;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08), rgba(255, 255, 255, .08)),
        url("../imagenes/match/fondo.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.match_quiz_screen .match_page {
    width: 100%;
}


.match_quiz {
    width: min(430px, 96vw);
}

.match_stage {
    height: clamp(330px, calc(100vh - 190px), 560px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.match_card {
    width: min(360px, 92vw, calc((100vh - 190px) * 9 / 14));
    aspect-ratio: 9 / 14;
    max-height: 560px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .25);
    touch-action: none;
    cursor: grab;
    user-select: none;
    transition: transform .3s ease, opacity .3s ease;
}

.match_card:active {
    cursor: grabbing;
}

.match_card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

.match_remaining_badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    min-width: 40px;
    height: 40px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 20px;
    background: rgba(32, 37, 45, .88);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
    pointer-events: none;
}

.match_card_front,
.match_card_back {
    position: absolute;
}

.match_card_front {
    z-index: 2;
}

.match_card_back {
    z-index: 1;
    transform: scale(.96);
    opacity: .72;
}

.match_question_text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    color: #fff;
    font-size: 22px;
    line-height: 1.22;
    font-weight: 700;
    background: linear-gradient(transparent, rgba(0, 0, 0, .88));
    text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

.match_card .match_question_text {
    text-align: left !important;
}

.match_buttons {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.match_btn_no {
    --match-icon-color: #ff1877;
}

.match_btn_maybe {
    --match-icon-color: #1999e8;
}

.match_btn_yes {
    --match-icon-color: #62d52f;
}

.match_btn {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #303641;
    border-radius: 50%;
    background: #20252d;
    cursor: pointer;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 3px 7px rgba(0, 0, 0, .32);
    transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    background: #20252d !important;
    color: var(--match-icon-color) !important;
}

@media (hover: hover) and (pointer: fine) {
    .match_btn:hover {
        background: #272d36 !important;
        transform: translateY(-2px);
    }
}

.match_btn:active {
    transform: translateY(0) scale(.94);
}

.match_btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .8);
    outline-offset: 3px;
}

.match_btn span {
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
}

.match_btn_no {
    color: #ff1877;
}

.match_btn_no span {
    font-size: 38px;
    transform: translateY(-1px);
}

.match_btn_maybe {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    color: #1999e8;
}

.match_btn_maybe span {
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.match_btn_yes {
    color: #62d52f;
}

.match_btn_yes span {
    font-size: 26px;
    transform: translateY(1px) scaleX(1.01);
    font-weight: 900;
}

.match_results {
    width: min(428px, 94vw);
}

.match_result_cards {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.match_result_item {
    width: fit-content;
    min-width: 350px;
    max-width: 100%;
    display: grid;
    grid-template-columns: 40px minmax(0, auto);
    column-gap: 16px;
    align-items: start;
    border: 1px solid #ded9cf;
    border-radius: 8px;
    padding: 18px 28px 18px 18px;
    background: #faf9f6;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.match_result_rank {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #20252d;
    color: #fff;
    font-weight: 800;
    line-height: 1;
    grid-row: 1 / span 3;
    margin-top: 1px;
}

.match_result_percent {
    margin-bottom: 3px;
    color: #ac933e;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.match_result_item h2 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.2;
    white-space: nowrap;
}

.match_result_actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
}

.match_result_btn {
    height: 40px;
    min-height: 40px;
    width: auto;
    padding: 0 16px;
    border: 0 !important;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1 !important;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    vertical-align: top;
    margin: 0 !important;
    transition: background-color .22s ease, color .22s ease, transform .22s ease;
}

.match_result_btn_primary {
    background: #ac933e !important;
    color: #fff !important;
}

.match_result_btn_secondary {
    background: #20252d !important;
    color: #fff !important;
}

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

.match_result_btn_primary:hover {
    background: #7d6928 !important;
    color: #fff !important;
}

.match_result_btn_secondary:hover {
    background: #3a414d !important;
    color: #fff !important;
}

.match_send_results_form {
    margin: 18px 0 0;
}

.match_send_results_button {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 4px;
    background: #2f86ed;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .22s ease;
}

.match_send_results_button:hover {
    background: #176fd3;
    color: #fff;
}

.match_email_notice,
.match_email_error {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.match_email_notice {
    background: #e7f5ec;
    color: #17643a;
}

.match_email_error {
    background: #fdeaea;
    color: #9d1c28;
}

.match_result_modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    background: rgba(0, 0, 0, .58);
    overflow-y: auto;
}

.match_result_modal.is-open {
    display: flex;
}

.match_result_modal_box {
    width: min(680px, 96vw);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .35);
}

.match_result_modal_header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border-bottom: 1px solid #e3dfd8;
}

.match_result_modal_header h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.match_result_modal_footer {
    display: flex;
    justify-content: flex-end;
    padding: 2px 28px 20px;
}

.match_result_modal_close {
    min-height: 36px;
    width: auto;
    min-width: 0;
    padding: 0 16px;
    border: 0 !important;
    border-radius: 6px;
    background: #20252d !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.match_result_modal_close:hover {
    background: #3a414d !important;
    color: #fff !important;
}

.match_result_modal_body {
    padding: 16px 18px 18px;
    color: #333;
    font-size: 16px;
    line-height: 1.55;
}

.match_result_modal_body::after {
    content: "";
    display: block;
    clear: both;
}

.match_result_modal_logo {
    float: left;
    width: auto;
    max-width: 48%;
    height: auto;
    max-height: 150px;
    margin: 0 18px 10px 0;
    border: 1px solid #333;
    background: #fff;
}

@media (max-width: 420px) {
    .match_page {
        padding: 16px;
    }

    .match_stage {
        height: clamp(330px, calc(100svh - 150px), 560px);
    }

    .match_card {
        width: min(360px, 92vw, calc((100svh - 150px) * 9 / 14));
    }

    .match_question_text {
        font-size: 19px;
        padding: 20px;
    }

    .match_buttons {
        gap: 12px;
        margin-top: 14px;
    }

    .match_btn {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .match_btn_maybe {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .match_results {
        width: min(428px, 100%);
        padding: 20px;
    }

    .match_result_item {
        width: 100%;
        min-width: 0;
        grid-template-columns: 36px minmax(0, 1fr);
        column-gap: 12px;
        padding: 15px;
    }

    .match_result_item h2 {
        font-size: 21px;
        white-space: normal;
    }

    .match_result_actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .match_result_btn {
        width: auto;
        height: 34px;
        min-height: 34px;
        padding: 0 9px;
        font-size: 11px;
    }

    .match_result_modal {
        padding: 18px 10px;
    }

    .match_result_modal_box {
        max-height: calc(100vh - 36px);
    }

    .match_result_modal_logo {
        float: none;
        display: block;
        width: 100%;
        height: auto;
        max-height: none;
        margin: 0 0 12px;
    }

    .match_result_modal_footer {
        padding: 0 18px 18px;
    }
}




.match_results,
.match_results h1,
.match_result_item,
.match_result_item h2,
.match_result_description {
    text-align: left !important;
}


.enlace-h2 {
    display: inline-block;
    margin-bottom: 15px;
    color: #ee5853;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.enlace-h2:hover {
    color: #eb236e;
    transform: scale(1.08);
}


.match_admin_link_container {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -16px;
}

.match_admin_link {
    display: inline-block;
    padding: 14px 28px;
    background: #ee5156;
    color: #fff;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.match_admin_link:hover {
    background: #b42828;
    color: #fff;
}

@media (max-width: 767px) {
    .match_quiz_screen {
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .match_quiz_screen .match_page {
        width: 100%;
        margin: 0;
        padding: 16px;
        align-items: center;
        justify-content: center;
    }
}
