body.cult-os-auth-modal-open {
    overflow: hidden;
}

.sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.cult-os-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.cult-os-auth-modal[hidden] {
    display: none !important;
}

.cult-os-auth-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0;
    cursor: default;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: opacity 0.22s ease, backdrop-filter 0.22s ease, -webkit-backdrop-filter 0.22s ease;
}

.cult-os-auth-modal-dialog {
    position: relative;
    width: min(620px, calc(100vw - 48px));
    max-width: 100%;
    max-height: min(88vh, 760px);
    padding: 22px 24px 24px;
    border: 1px solid rgba(153, 112, 26, 0.48);
    background:
        linear-gradient(180deg, rgba(255, 239, 191, 0.98) 0%, rgba(235, 204, 134, 0.98) 100%);
    color: #1a1308;
    font-family: "Courier New", Courier, monospace;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    filter: blur(14px);
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.22s ease, filter 0.22s ease, transform 0.22s ease;
    box-shadow:
        0 34px 60px rgba(0, 0, 0, 0.42),
        inset 1px 1px 0 rgba(255, 255, 255, 0.35),
        inset -1px -1px 0 rgba(107, 75, 11, 0.2);
}

.cult-os-auth-modal.is-open .cult-os-auth-modal-backdrop {
    opacity: 1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cult-os-auth-modal.is-open .cult-os-auth-modal-dialog {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

.cult-os-auth-modal-dialog:focus {
    outline: none;
}

.cult-os-auth-modal-panel {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.cult-os-auth-modal-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    flex-wrap: nowrap;
}

.cult-os-auth-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7a230f;
    font: 400 1.5em/1 "Permanent Marker", "Courier New", Courier, monospace;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    margin-left: auto;
}

.cult-os-auth-modal-body {
    display: grid;
    gap: 0;
}

.cult-os-auth-modal-kicker {
    margin: 0;
    color: #7a230f;
    font: 400 1.5em/1.15 "Permanent Marker", "Courier New", Courier, monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 1 1 auto;
    min-width: 0;
}

.cult-os-auth-modal-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    min-width: 0;
}

.cult-os-auth-modal-option-column {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.cult-os-auth-modal-option-title {
    margin: 0;
    color: #6a4920;
    font-size: 0.95em;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.35;
    text-transform: uppercase;
}

.cult-os-auth-modal-divider {
    width: 1px;
    min-height: 100%;
    background: linear-gradient(180deg, rgba(153, 112, 26, 0.08) 0%, rgba(153, 112, 26, 0.42) 50%, rgba(153, 112, 26, 0.08) 100%);
}

.cult-os-auth-modal-actions,
.cult-os-auth-modal-email-form {
    display: grid;
    gap: 12px;
}

.cult-os-auth-modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid rgba(153, 112, 26, 0.36);
    background: rgba(255, 248, 229, 0.55);
    color: #1a1308;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
    cursor: pointer;
}

.cult-os-auth-modal-link:hover,
.cult-os-auth-modal-link:focus-visible,
.cult-os-auth-modal-twitch-button:hover,
.cult-os-auth-modal-twitch-button:focus-visible {
    outline: none;
    transform: translateY(-1px);
    border-color: rgba(153, 112, 26, 0.58);
    color: #4b1d11;
}

.cult-os-auth-modal-link-solid {
    background: linear-gradient(180deg, rgba(255, 230, 160, 0.95) 0%, rgba(223, 184, 99, 0.98) 100%);
    border-color: rgba(153, 112, 26, 0.42);
}

.cult-os-auth-modal-link-outline {
    background: rgba(255, 248, 229, 0.4);
}

.cult-os-auth-modal-link-disabled {
    border-color: rgba(106, 73, 32, 0.18);
    background: rgba(255, 248, 229, 0.28);
    color: rgba(26, 19, 8, 0.45);
    cursor: default;
}

.cult-os-auth-modal-link-disabled:hover,
.cult-os-auth-modal-link-disabled:focus-visible {
    transform: none;
    border-color: rgba(106, 73, 32, 0.18);
    color: rgba(26, 19, 8, 0.45);
}

.cult-os-auth-modal-email-form input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid rgba(153, 112, 26, 0.32);
    background: rgba(255, 250, 239, 0.72);
    color: #1a1308;
    font: inherit;
    letter-spacing: 0.04em;
}

.cult-os-auth-modal-email-form input::placeholder {
    color: rgba(26, 19, 8, 0.44);
}

.cult-os-auth-modal-email-form input:focus {
    outline: none;
    border-color: rgba(153, 112, 26, 0.56);
}

.cult-os-auth-modal-message {
    margin: 0;
    color: rgba(26, 19, 8, 0.7);
    font-size: 0.92em;
    line-height: 1.5;
}

.cult-os-auth-modal-message-error {
    color: #edb1b1;
}

.cult-os-auth-modal-message-success {
    color: #b9ddb5;
}

.cult-os-auth-modal-twitch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid rgba(153, 112, 26, 0.36);
    background: rgba(255, 248, 229, 0.55);
}

.cult-os-auth-modal-twitch-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
}

.cult-os-auth-modal-twitch-glitch {
    display: block;
    width: 26px;
    height: auto;
}

.cult-os-auth-modal-twitch-wordmark {
    display: block;
    width: 124px;
    height: auto;
}

@media (max-width: 820px) {
    .cult-os-auth-modal {
        padding: 16px;
    }

    .cult-os-auth-modal-dialog {
        width: min(420px, calc(100vw - 32px));
        padding: 18px 16px 16px;
    }

    .cult-os-auth-modal-options {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cult-os-auth-modal-divider {
        width: 100%;
        min-height: 1px;
        height: 1px;
    }

    .cult-os-auth-modal-header {
        gap: 12px;
    }

    .cult-os-auth-modal-kicker {
        font-size: 1.25em;
    }

    .cult-os-auth-modal-close {
        font-size: 1.25em;
    }
}
