/* Instructions orientation modal - shared size for welcome + Ch3 practice intro */

.instructions-modal {
    position: relative;
    width: min(96vw, 1180px);
    max-height: min(92vh, 780px);
    margin: 0 auto;
    align-self: center;
    overflow: hidden;
}

.instructions-modal__header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0;
    min-height: 0;
    height: 0;
    background: transparent;
    border: 0;
    overflow: visible;
}

.instructions-modal__title {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.25;
}

.instructions-modal__close {
    top: 0.85rem;
    left: 0.85rem;
    transform: none;
    width: 1.85rem;
    height: 1.85rem;
    border-width: 1.5px;
    border-color: rgba(50, 15, 91, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: var(--about-brand-purple, #320f5b);
}

.instructions-modal__close:hover {
    transform: scale(1.06);
    background: var(--about-brand-yellow, #fec600);
    color: var(--about-brand-purple, #320f5b);
    border-color: var(--about-brand-yellow, #fec600);
}

.instructions-modal__close:active {
    transform: scale(1.01);
}

.instructions-modal__close:focus-visible {
    transform: none;
}

.instructions-modal__body {
    padding: clamp(1.75rem, 3.2vw, 2.6rem) clamp(1.75rem, 3.5vw, 2.85rem) clamp(1.5rem, 2.8vw, 2.2rem);
    text-align: right;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.instructions-modal__subtitle {
    margin: 0 0 clamp(1.4rem, 2.8vw, 2rem);
    color: var(--about-brand-purple, #320f5b);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    line-height: 1.35;
    font-weight: 800;
    text-align: center;
}

.instructions-modal__cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.2vw, 1.6rem);
    flex: 0 1 auto;
}

.instructions-modal__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.25rem 0.35rem;
    text-align: right;
    box-sizing: border-box;
    min-height: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.instructions-modal__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: rgba(50, 15, 91, 0.08);
    color: var(--about-brand-purple);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.instructions-modal__card-title {
    margin: 0;
    color: var(--about-brand-purple);
    font-size: clamp(1.12rem, 1.8vw, 1.28rem);
    font-weight: 800;
    line-height: 1.3;
}

.instructions-modal__card-text {
    margin: 0;
    color: #4b4458;
    font-size: clamp(0.98rem, 1.45vw, 1.08rem);
    line-height: 1.55;
    font-weight: 500;
}

.instructions-modal__actions {
    display: flex;
    justify-content: center;
    margin-top: clamp(1.4rem, 2.8vw, 2rem);
    padding-top: 0.15rem;
}

.instructions-modal__start {
    width: auto;
    min-width: 280px;
    max-width: 100%;
    padding: 0.9rem 2rem;
    font-size: 1.12rem;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(254, 198, 0, 0.28);
}

.instructions-modal__start:focus-visible {
    outline: 3px solid rgba(50, 15, 91, 0.35);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .instructions-modal {
        width: min(96vw, 640px);
        max-height: min(94vh, 860px);
    }

    .instructions-modal__cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .instructions-modal__card {
        padding: 0.15rem 0;
    }
}

@media (max-width: 767.98px) {
    .instructions-modal {
        width: min(96vw, 520px);
        max-height: min(94vh, 900px);
        overflow-y: auto;
    }

    .instructions-modal__header {
        padding: 0;
    }

    .instructions-modal__body {
        padding: 1.4rem 1.2rem 1.25rem;
    }

    .instructions-modal__start {
        width: 100%;
        min-width: 0;
    }
}
