/* X MATCH — flat lavender theme; no glass, transparency, gloss, or gradients. */
.x-match {
    position: relative;
    isolation: isolate;
    max-width: 1000px;
    margin: 28px auto;
    padding: 28px;
    color: #111111;
    font-family: inherit;
    background: #e8e2ff;
    border: 1px solid #d5cbff;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(66, 48, 130, .12);
}

.x-match * { box-sizing: border-box; }

.x-match-title {
    color: #080808;
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 7px;
    letter-spacing: -.25px;
}

.x-match-instruction {
    color: #29243b;
    margin-bottom: 22px;
}

.x-match-table { width: 100%; }

.x-match-head,
.x-match-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.x-match-head {
    margin-bottom: 10px;
    color: #101010;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .5px;
}

.x-match-column-a,
.x-match-column-b {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.x-match-static-card,
.x-match-card {
    min-height: 64px;
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    color: #090909;
    line-height: 1.35;
}

.x-match-static-card {
    background: #ffffff;
    border: 1px solid #e2def0;
    box-shadow: 0 4px 10px rgba(44, 35, 88, .08);
    font-weight: 700;
}

.x-match-card {
    background: #ffffff;
    border: 1px solid #ded9ef;
    box-shadow: 0 5px 12px rgba(44, 35, 88, .10);
    font-weight: 700;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, opacity .12s ease;
}

.x-match-card:hover {
    transform: translateY(-2px);
    border-color: #b9adf4;
    box-shadow: 0 8px 16px rgba(44, 35, 88, .14);
}

.x-match-card:focus-visible,
.x-match-actions button:focus-visible {
    outline: 3px solid #8bbcff;
    outline-offset: 3px;
}

.x-match-card.x-dragging,
.x-match-card.x-touch-dragging {
    opacity: .78;
    transform: scale(1.02);
    cursor: grabbing;
    box-shadow: 0 12px 22px rgba(44, 35, 88, .18);
}

.x-match-drag-icon {
    flex: 0 0 auto;
    margin-right: 12px;
    font-size: 19px;
    line-height: 1;
    letter-spacing: -3px;
    color: #7770a6;
}

.x-match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.x-match-actions button {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 13px 23px;
    font: inherit;
    font-weight: 800;
    letter-spacing: .15px;
    cursor: pointer;
    box-shadow: 0 4px 9px rgba(31, 83, 177, .14);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.x-match-actions button:hover {
    transform: translateY(-1px);
    filter: brightness(1.035);
    box-shadow: 0 7px 13px rgba(31, 83, 177, .18);
}

.x-match-actions button:active { transform: translateY(0); }

.x-match-submit {
    background: #2878ed;
    border-color: #1764d4 !important;
    color: #ffffff !important;
}

.x-match-reset {
    background: #cfe2ff;
    border-color: #9bc2ff !important;
    color: #111111 !important;
}

.x-match-card.x-correct {
    border: 2px solid #25823b;
    background: #f2fbf4;
}

.x-match-card.x-wrong {
    border: 2px solid #c62828;
    background: #fff3f3;
}

.x-match-result {
    display: none;
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #d5cdef;
    border-radius: 10px;
    color: #111111;
}

.x-match-result.x-scored,
.x-match-result.x-perfect { display: block; }

.x-match-result.x-scored { background: #ffffff; }
.x-match-result.x-perfect { background: #edf8ef; }

.x-match-score { font-size: 30px; font-weight: 900; }
.x-match-percent { font-size: 17px; margin: 2px 0 5px; }

.x-match-error {
    padding: 14px;
    border-radius: 10px;
    background: #fff3f3;
    color: #8a1f1f;
}

@media (max-width: 700px) {
    .x-match {
        padding: 17px;
        border-radius: 14px;
    }

    .x-match-head,
    .x-match-body {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .x-match-static-card,
    .x-match-card {
        min-height: 60px;
        padding: 12px 10px;
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .x-match-drag-icon { margin-right: 7px; }
    .x-match-actions button { padding: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .x-match-card,
    .x-match-actions button { transition: none; }
}
