#open-dialogue-btn.secondary-btn {
    border: 1px solid transparent;
    border-radius: 50px;
    background: #124143;
    color: #ffffff;
    min-height: 40px;
    padding: 4px 0;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

#open-dialogue-btn.secondary-btn:hover {
    background: #0d3320;
    color: #ffffff;
}

#open-dialogue-btn.secondary-btn img {
    width: 30px;
    height: 30px;
}

.auth-shell-login {
    width: min(640px, calc(100% - 32px));
}

.ndi-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(248, 248, 248, 0.82);
}

.ndi-modal-overlay.is-open {
    display: flex;
}

.ndi-modal-card {
    position: relative;
    width: min(410px, calc(100vw - 40px));
    max-width: none;
    max-height: calc(100vh - 28px);
    overflow-y: scroll;
    padding: 20px 26px 36px 28px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(18, 73, 61, 0.06);
    border-right: 4px solid #5ac994;
    box-shadow: 0 6px 26px rgba(20, 20, 20, 0.12);
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #5ac994 transparent;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #aaaaaa;
}

.ndi-modal-card::-webkit-scrollbar {
    width: 9px;
}

.ndi-modal-card::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

.ndi-modal-card::-webkit-scrollbar-thumb {
    background: #5ac994;
    border-radius: 999px;
}

.ndi-modal-body {
    display: grid;
    justify-items: center;
    gap: 24px;
    width: 100%;
    padding-right: 8px;
}

.ndi-modal-title {
    max-width: none;
    margin: 0;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.16;
    letter-spacing: 0;
    font-weight: 700;
    color: #101010;
}

.ndi-modal-title span {
    color: #5ac994;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: auto;
    height: auto;
    border: 0;
    padding: 4px;
    background: transparent;
    color: #a5a8ae;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    z-index: 1;
}

.modal-close:hover {
    color: #7b838c;
}

.ndi-mobile-open,
.ndi-mobile-divider {
    display: none;
}

.ndi-qr-shell {
    display: grid;
    place-items: center;
    width: 100%;
}

.qr-wrapper {
    position: relative;
    width: 132px;
    height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid #3cd4a0;
    box-shadow: none;
}

.loading-state,
.error-state {
    display: grid;
    place-items: center;
    gap: 10px;
    text-align: center;
    color: #a0a6ad;
    line-height: 1.45;
    font-weight: 600;
    padding: 12px;
    font-size: 0.82rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid rgba(90, 201, 148, 0.18);
    border-top-color: #5ac994;
    animation: spin 0.8s linear infinite;
}

.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-logo-overlay {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    padding: 4px;
    box-shadow: 0 8px 18px rgba(12, 48, 42, 0.14);
}

.ndi-instructions {
    width: min(300px, 100%);
}

.instruction-list {
    margin: 0 auto;
    padding-left: 1.45rem;
    list-style: decimal;
    list-style-position: outside;
    color: #a2a7ad;
    text-align: left;
}

.instruction-list li {
    display: list-item;
    color: #a8aaad;
    font-size: 0.92rem;
    line-height: 1.36;
    font-weight: 700;
    padding-left: 0.15rem;
}

.instruction-list li + li {
    margin-top: 10px;
}

.instruction-list li::marker {
    color: #a2a7ad;
    font-weight: 700;
}

.inline-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    display: inline-block;
    margin: 0 2px;
}

.ndi-video-guide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 172px;
    min-width: 172px;
    min-height: 32px;
    padding: 4px 12px 4px 14px;
    border: 2px solid #5ac994;
    border-radius: 999px;
    background: #ffffff;
    color: #5ac994;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.ndi-video-guide img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.ndi-download-copy {
    display: grid;
    gap: 4px;
    margin: 0;
    text-align: center;
    color: #aaadb2;
    font-size: 0.9rem;
    line-height: 1.28;
    font-weight: 700;
}

.ndi-download-copy span {
    color: #5ac994;
}

.ndi-store-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.ndi-store-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px;
}

.ndi-store-badge img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.ndi-support-block {
    display: grid;
    gap: 12px;
    text-align: center;
}

.ndi-support-block p {
    margin: 0;
    color: #5ac994;
    font-size: 0.92rem;
    line-height: 1.15;
    font-weight: 500;
}

.ndi-support-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ndi-support-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #aaadb2;
    text-decoration: none;
    font-size: 0.86rem;
    line-height: 1.1;
    font-weight: 700;
}

.ndi-support-link:hover {
    color: #7d8388;
}

.ndi-support-link img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

@media (max-width: 720px) {
    .auth-shell-login {
        width: min(100%, calc(100% - 20px));
    }
}

@media (max-width: 768px) {
    .ndi-modal-overlay {
        padding: 10px;
    }

    .ndi-modal-card {
        width: min(390px, calc(100vw - 36px));
        max-height: calc(100vh - 20px);
        padding: 28px 14px 30px 24px;
        border-radius: 16px;
    }

    .ndi-modal-body {
        gap: 30px;
        padding-right: 12px;
    }

    .modal-close {
        top: 14px;
        right: 16px;
        font-size: 1.45rem;
    }

    .ndi-modal-title {
        font-size: 1.55rem;
    }

    .ndi-mobile-open {
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: 0 18px;
        border-radius: 999px;
        background: #5ac994;
        color: #ffffff;
        text-decoration: none;
        font-size: 1rem;
        font-weight: 700;
        opacity: 0.62;
        pointer-events: none;
    }

    .ndi-mobile-open.is-ready {
        opacity: 1;
        pointer-events: auto;
    }

    .ndi-mobile-divider {
        align-items: center;
        gap: 10px;
        width: 100%;
        color: #a2a7ad;
        font-size: 0.82rem;
        letter-spacing: 0.18em;
    }

    .ndi-mobile-divider span {
        flex: 1;
        height: 1px;
        background: rgba(18, 73, 61, 0.12);
    }

    .qr-wrapper {
        width: 182px;
        height: 182px;
    }

    .ndi-instructions {
        width: 100%;
    }

    .instruction-list li {
        font-size: 1rem;
    }

    .inline-icon {
        width: 24px;
        height: 24px;
    }

    .ndi-video-guide {
        width: min(100%, 280px);
        min-width: 0;
        min-height: 44px;
        padding: 7px 12px 7px 16px;
        font-size: 1rem;
    }

    .ndi-store-buttons {
        gap: 14px;
    }

    .ndi-store-badge {
        width: 160px;
    }

    .ndi-support-links {
        gap: 18px;
        flex-wrap: wrap;
    }

    .ndi-support-block p {
        font-size: 1.08rem;
    }

    .ndi-support-link {
        font-size: 1rem;
    }
}

@media (max-width: 450px) {
    .ndi-modal-card {
        width: min(390px, calc(100vw - 20px));
        padding: 20px 8px 24px 18px;
    }

    .ndi-modal-body {
        gap: 24px;
        padding-right: 8px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        font-size: 1.15rem;
    }

    .ndi-mobile-open {
        display: inline-flex;
    }

    .ndi-mobile-divider {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        color: #a8aaad;
        font-size: 0.82rem;
        letter-spacing: 0.18em;
    }

    .ndi-mobile-divider span {
        flex: 1;
        height: 1px;
        background: rgba(18, 73, 61, 0.12);
    }

    .instruction-list {
        padding-left: 1.2rem;
    }

    .ndi-modal-title {
        font-size: 1.35rem;
    }

    .qr-wrapper {
        width: 168px;
        height: 168px;
    }

    .instruction-list li {
        font-size: 0.98rem;
    }

    .inline-icon {
        width: 22px;
        height: 22px;
    }

    .ndi-video-guide {
        width: 100%;
        max-width: 280px;
        min-height: 46px;
        border-width: 3px;
    }

    .ndi-video-guide span {
        font-size: 0.98rem;
    }

    .ndi-store-buttons {
        gap: 12px;
    }

    .ndi-store-badge {
        width: 148px;
    }

    .ndi-download-copy {
        font-size: 1.05rem;
    }

    .ndi-support-links {
        flex-direction: column;
        gap: 14px;
    }

    .ndi-support-block p {
        font-size: 1rem;
    }

    .ndi-support-link {
        font-size: 0.98rem;
    }
}

/* Exact desktop NDI modal match from the provided reference. */
@media (min-width: 769px) {
    .ndi-modal-overlay {
        padding: 0;
        background: #ffffff;
    }

    .ndi-modal-card {
        width: 410px;
        max-height: calc(100vh - 44px);
        padding: 20px 26px 36px 30px;
        overflow-y: auto;
        border: 1px solid rgba(18, 73, 61, 0.06);
        border-right: 4px solid #5ac994;
        border-radius: 6px;
        background: #f8f8f8;
        box-shadow: 0 2px 18px rgba(0, 0, 0, 0.16);
        scrollbar-width: none;
    }

    .ndi-modal-card::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    .ndi-modal-body {
        gap: 25px;
        padding-right: 0;
    }

    .ndi-modal-title {
        margin: 0;
        font-size: 22px;
        line-height: 1.18;
        font-weight: 700;
        color: #101010;
    }

    .modal-close {
        top: 12px;
        right: 18px;
        padding: 0;
        color: #9b9b9b;
        font-size: 17px;
        font-weight: 700;
    }

    .qr-wrapper {
        width: 132px;
        height: 132px;
        border: 2px solid #3cd4a0;
        border-radius: 5px;
    }

    .qr-logo-overlay {
        width: 28px;
        height: 28px;
    }

    .ndi-instructions {
        width: 300px;
    }

    .instruction-list {
        width: 100%;
        padding-left: 18px;
        list-style: decimal;
        list-style-position: outside;
    }

    .instruction-list li {
        display: list-item;
        font-size: 13px;
        line-height: 1.45;
        color: #9ea3a8;
        font-weight: 700;
    }

    .instruction-list li + li {
        margin-top: 2px;
    }

    .instruction-list li::marker {
        color: #a6abb0;
        font-weight: 700;
    }

    .inline-icon {
        width: 18px;
        height: 18px;
    }

    .ndi-video-guide {
        width: 178px;
        min-width: 178px;
        min-height: 34px;
        padding: 4px 12px;
        gap: 9px;
        border: 3px solid #5ac994;
        border-radius: 50px;
        background: #f8f8f8;
        color: #5ac994;
        font-size: 13px;
        font-weight: 700;
    }

    .ndi-video-guide img {
        width: 19px;
        height: 19px;
    }

    .ndi-video-guide span {
        font-size: 13px;
        line-height: 1;
    }

    .ndi-download-copy {
        gap: 2px;
        font-size: 13px;
        line-height: 1.25;
    }

    .ndi-store-buttons {
        gap: 12px;
    }

    .ndi-store-badge {
        width: 112px;
    }

    .ndi-support-block {
        gap: 12px;
    }

    .ndi-support-block p {
        font-size: 14px;
        font-weight: 500;
    }

    .ndi-support-links {
        gap: 16px;
    }

    .ndi-support-link {
        gap: 6px;
        font-size: 13px;
        color: #9fa4a9;
    }

    .ndi-support-link img {
        width: 16px;
        height: 16px;
    }
}

/* NDI marker and mobile button corrections. */
.ndi-modal-card .instruction-list li::before {
    content: none !important;
    display: none !important;
}

.ndi-modal-card .instruction-list {
    list-style: decimal outside;
}

.ndi-modal-card .instruction-list li {
    display: list-item;
}

@media (min-width: 451px) and (max-width: 768px) {
    .ndi-mobile-open,
    .ndi-mobile-divider {
        display: none;
    }
}

@media (max-width: 450px) {
    .ndi-modal-card {
        width: min(230px, calc(100vw - 20px));
        padding: 18px 14px 22px;
        border-radius: 8px;
    }

    .ndi-modal-body {
        gap: 16px;
        padding-right: 0;
    }

    .ndi-modal-title {
        font-size: 14px;
        line-height: 1.2;
    }

    .modal-close {
        top: 8px;
        right: 10px;
        font-size: 12px;
    }

    .ndi-mobile-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 155px;
        min-height: 20px;
        padding: 0 10px;
        border-radius: 3px;
        background: #5ac994;
        color: #ffffff;
        text-decoration: none;
        font-size: 9px;
        font-weight: 700;
        opacity: 0.62;
        pointer-events: none;
    }

    .ndi-mobile-open.is-ready {
        opacity: 1;
        pointer-events: auto;
    }

    .ndi-mobile-divider {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        color: #a8aaad;
        font-size: 8px;
        letter-spacing: 0.14em;
    }

    .ndi-mobile-divider span {
        flex: 1;
        height: 1px;
        background: rgba(18, 73, 61, 0.12);
    }

    .qr-wrapper {
        width: 84px;
        height: 84px;
        border-width: 1px;
        border-radius: 4px;
    }

    .qr-logo-overlay {
        width: 20px;
        height: 20px;
    }

    .ndi-instructions {
        width: 100%;
    }

    .instruction-list {
        padding-left: 15px;
    }

    .instruction-list li {
        font-size: 9px;
        line-height: 1.35;
    }

    .instruction-list li + li {
        margin-top: 3px;
    }

    .inline-icon {
        width: 13px;
        height: 13px;
    }

    .ndi-video-guide {
        width: 126px;
        min-width: 126px;
        min-height: 22px;
        padding: 2px 8px 2px 10px;
        gap: 6px;
        border-width: 2px;
        font-size: 9px;
    }

    .ndi-video-guide img {
        width: 14px;
        height: 14px;
    }

    .ndi-video-guide span {
        font-size: 9px;
    }

    .ndi-download-copy {
        font-size: 9px;
        line-height: 1.25;
    }

    .ndi-store-buttons {
        gap: 8px;
    }

    .ndi-store-badge {
        width: 68px;
    }

    .ndi-support-block {
        gap: 8px;
    }

    .ndi-support-block p,
    .ndi-support-link {
        font-size: 9px;
    }

    .ndi-support-links {
        flex-direction: row;
        gap: 8px;
    }

    .ndi-support-link img {
        width: 12px;
        height: 12px;
    }
}
