/**
 * Auth modal — doplňky k psychaura-shell.css (jednotný vzhled jako materiály / testy).
 * Povinné pořadí: design-tokens.css → psychaura-shell.css → tento soubor.
 */

.pa-modal-overlay {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pa-modal-brand {
    text-align: center;
    margin: 0 0 14px;
    padding: 0 0.25rem;
}

.pa-modal-brand__badge {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 2px solid var(--pa-ink, #211d1f);
    background: #ffffff;
    color: var(--pa-plus-burgundy, #a85d72);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pa-modal-brand__tag {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--pa-text-muted, #6b5f66);
}

.pa-modal-box--register .pa-tab-btn.active {
    color: var(--pa-plus-burgundy, #a85d72);
}

.pa-auth-reg-perks {
    margin: 0;
    padding: 0.55rem 0.65rem 0.55rem 1.85rem;
    list-style: none;
    border-radius: 14px;
    border: 2px dashed rgba(168, 93, 114, 0.35);
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--pa-text, #3d363b);
}

.pa-auth-reg-perks li {
    position: relative;
    margin: 0;
}

.pa-auth-reg-perks li + li {
    margin-top: 0.28rem;
}

.pa-auth-reg-perks li::before {
    content: "✓";
    position: absolute;
    left: -1.15rem;
    font-weight: 900;
    color: var(--pa-plus-burgundy, #a85d72);
}

.pa-modal-box .pa-reg-consent {
    margin: 0.35rem 0 0.5rem;
    padding: 0.55rem 0.6rem;
    border-radius: 12px;
    background: rgba(250, 248, 244, 0.9);
    border: 1px solid rgba(34, 30, 33, 0.08);
}

.pa-auth-help {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(34, 30, 33, 0.08);
}

.pa-auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.pa-auth-links a {
    color: var(--pa-ink, #221e21);
    text-decoration: none;
}

.pa-modal-box .swpm-registration-error,
.pa-modal-box .swpm-error-text,
.pa-modal-box .swpm-post-pass-msg,
.pa-modal-box .swpm-login-error,
.pa-modal-box .swpm-registration-success,
.pa-modal-box .swpm-registration-success-msg {
    margin: 0 0 14px !important;
    padding: 12px 14px !important;
    border-radius: 16px;
    font-weight: 700;
}

.pa-modal-box .swpm-registration-error,
.pa-modal-box .swpm-error-text,
.pa-modal-box .swpm-login-error {
    background: #fff1f2 !important;
    color: #9f1239 !important;
    border: 2px solid #f9a8d4 !important;
}

.pa-modal-box .swpm-registration-success,
.pa-modal-box .swpm-registration-success-msg,
.pa-modal-box .swpm-post-pass-msg {
    background: #ecfdf5 !important;
    color: #166534 !important;
    border: 2px solid #86efac !important;
}

body.dark-mode .pa-modal-box .swpm-registration-error,
body.dark-mode .pa-modal-box .swpm-error-text,
body.dark-mode .pa-modal-box .swpm-login-error {
    background: rgba(159, 18, 57, 0.18) !important;
    color: #ffc3d6 !important;
    border-color: rgba(249, 168, 212, 0.35) !important;
}

body.dark-mode .pa-modal-box .swpm-registration-success,
body.dark-mode .pa-modal-box .swpm-registration-success-msg,
body.dark-mode .pa-modal-box .swpm-post-pass-msg {
    background: rgba(22, 101, 52, 0.2) !important;
    color: #b7f4cb !important;
    border-color: rgba(134, 239, 172, 0.28) !important;
}

#authModal .pa-modal-box.pa-modal-box--register {
    width: min(94vw, 540px);
    max-width: 540px;
    max-height: min(92vh, 900px);
}

#authModal .pa-modal-box:not(.pa-modal-box--reg-success) #modal-content-register .pa-modal-title,
#authModal .pa-modal-box:not(.pa-modal-box--reg-success) #modal-content-register .pa-modal-subtitle {
    display: block !important;
    visibility: visible !important;
}

/* Modal nikdy nesmí zůstat prázdný — hlavička a záložky mimo obrazovku úspěchu vždy vidět */
#authModal .pa-modal-box:not(.pa-modal-box--reg-success) .pa-modal-brand,
#authModal .pa-modal-box:not(.pa-modal-box--reg-success) .pa-modal-tabs {
    display: block !important;
    visibility: visible !important;
}

#authModal .pa-modal-box:not(.pa-modal-box--reg-success) .pa-modal-tabs {
    display: flex !important;
}

#authModal #pa-auth-register-wrap .pa-auth-register-fallback {
    display: block !important;
    visibility: visible !important;
}

#authModal .pa-modal-content-area[hidden] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    flex: 0 0 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
}

#authModal .pa-modal-content-area:not([hidden]) {
    display: block !important;
    visibility: visible !important;
}

#authModal #pa-auth-register-wrap:not(.pa-auth-register-wrap--success) form,
#authModal #pa-auth-register-wrap:not(.pa-auth-register-wrap--success) .swpm-registration-form-section,
#authModal #pa-auth-register-wrap:not(.pa-auth-register-wrap--success) .swpm-registration-widget {
    display: block !important;
    visibility: visible !important;
}

.pa-auth-reg-success,
.pa-auth-reg-success-banner {
    margin: 0 0 14px !important;
    padding: 12px 14px !important;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    font-weight: 600;
    background: #ecfdf5 !important;
    color: #166534 !important;
    border: 2px solid #86efac !important;
}

.pa-auth-reg-success a,
.pa-auth-reg-success-banner a {
    color: #7a2e3a;
    font-weight: 800;
}

/* —— Obrazovka po úspěšné registraci —— */
.pa-modal-box.pa-modal-box--reg-success .pa-modal-tabs {
    display: none;
}

.pa-modal-box.pa-modal-box--reg-success .pa-modal-brand__tag {
    color: var(--pa-plus-burgundy, #a85d72);
    font-weight: 700;
}

.pa-modal-box.pa-modal-box--reg-success #modal-content-register .pa-modal-title,
.pa-modal-box.pa-modal-box--reg-success #modal-content-register .pa-modal-subtitle,
.pa-modal-box.pa-modal-box--reg-success #modal-content-register .pa-auth-help--register {
    display: none !important;
}

.pa-auth-reg-done {
    text-align: center;
    padding: 0.35rem 0.25rem 0.5rem;
    animation: paRegDoneIn 0.35s ease-out;
}

@keyframes paRegDoneIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pa-auth-reg-done__icon {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    border: 2px solid var(--pa-ink, #221e21);
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 4px 4px 0 var(--pa-ink, #221e21);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pa-auth-reg-done__icon span {
    font-size: 1.45rem;
    font-weight: 900;
    color: #166534;
    line-height: 1;
}

.pa-auth-reg-done__title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 900;
    color: var(--pa-ink, #221e21);
    line-height: 1.25;
}

.pa-auth-reg-done__lead {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 600;
    color: var(--pa-text, #3d363b);
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
}

.pa-auth-reg-done__note {
    margin: 0 0 1.1rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--pa-text-muted, #6b5f66);
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
}

.pa-auth-reg-done__cta {
    display: block;
    width: 100%;
    max-width: 16rem;
    margin: 0 auto 0.55rem;
    padding: 0.72rem 1rem;
    border: 2px solid var(--pa-ink, #221e21);
    border-radius: 999px;
    background: var(--pa-plus-burgundy, #a85d72);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--pa-ink, #221e21);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.pa-auth-reg-done__cta:hover {
    transform: translateY(-1px);
    box-shadow: 5px 5px 0 var(--pa-ink, #221e21);
}

.pa-auth-reg-done__ghost {
    display: block;
    margin: 0 auto;
    padding: 0.35rem 0.5rem;
    border: 0;
    background: transparent;
    color: var(--pa-text-muted, #6b5f66);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.pa-auth-already-member {
    text-align: center;
    padding: 0.5rem 0.35rem 0.65rem;
    animation: paRegDoneIn 0.35s ease-out;
}

.pa-auth-already-member__icon {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    border: 2px solid var(--pa-ink, #221e21);
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 4px 4px 0 var(--pa-ink, #221e21);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pa-auth-already-member__icon span {
    font-size: 1.45rem;
    font-weight: 900;
    color: #166534;
    line-height: 1;
}

.pa-auth-already-member__title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 900;
    color: var(--pa-ink, #221e21);
    line-height: 1.25;
}

.pa-auth-already-member__lead {
    margin: 0 auto 1rem;
    max-width: 26rem;
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 600;
    color: var(--pa-text, #3d363b);
}

.pa-auth-already-member__cta {
    display: block;
    width: 100%;
    max-width: 16rem;
    margin: 0 auto;
    padding: 0.72rem 1rem;
    border: 2px solid var(--pa-ink, #221e21);
    border-radius: 999px;
    background: #fff;
    color: var(--pa-ink, #221e21);
    font: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--pa-ink, #221e21);
}

.pa-auth-already-member__cta:hover {
    transform: translateY(-1px);
    box-shadow: 5px 5px 0 var(--pa-ink, #221e21);
}

#pa-auth-register-wrap.pa-auth-register-wrap--already form,
#pa-auth-register-wrap.pa-auth-register-wrap--already .swpm-registration-form,
#pa-auth-register-wrap.pa-auth-register-wrap--already .swpm-registration-form-section {
    display: none !important;
}

#pa-auth-register-wrap.pa-auth-register-wrap--has-error .swpm-error-text,
#pa-auth-register-wrap.pa-auth-register-wrap--has-error .swpm-registration-error,
#pa-auth-register-wrap.pa-auth-register-wrap--has-error .swpm-login-error,
#pa-auth-register-wrap.pa-auth-register-wrap--has-error .validationError,
#pa-auth-register-wrap.pa-auth-register-wrap--has-error .formErrorContent {
    display: block !important;
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.9rem;
    border: 2px solid #991b1b;
    border-radius: 14px;
    background: #fff7ed;
    color: #7f1d1d;
    font-weight: 700;
    line-height: 1.45;
}

.pa-auth-already-member--feedback .pa-auth-already-member__icon {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
}

.pa-auth-already-member--feedback .pa-auth-already-member__icon span {
    color: #c2410c;
}

body.dark-mode .pa-auth-already-member__title {
    color: #f8fafc;
}

body.dark-mode .pa-auth-already-member__lead {
    color: #e2e8f0;
}

#pa-auth-register-wrap.pa-auth-register-wrap--success > :not(.pa-auth-reg-done) {
    display: none !important;
}

#pa-auth-register-wrap:not(.pa-auth-register-wrap--success) .pa-auth-reg-done {
    display: none !important;
}

#pa-auth-register-wrap .swpm-registration-success,
#pa-auth-register-wrap .swpm-registration-success-msg:not(.pa-auth-reg-done) {
    display: none !important;
}

#authModal .pa-modal-subtitle a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

body.dark-mode .pa-auth-reg-done__icon {
    background: linear-gradient(145deg, rgba(22, 101, 52, 0.35) 0%, rgba(6, 78, 59, 0.5) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

body.dark-mode .pa-auth-reg-done__title {
    color: #f3f4f6;
}

body.dark-mode .pa-auth-reg-done__lead {
    color: #e5e7eb;
}

/* —— Auth modal: mobil + klávesnice (jen #authModal) —— */
html.pa-auth-modal-open {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
}

body.pa-auth-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

@media (min-width: 721px) {
    body.pa-auth-modal-open {
        position: fixed;
        width: 100%;
        left: 0;
        right: 0;
    }
}

@media (max-width: 720px) {
    html.pa-auth-modal-open,
    body.pa-auth-modal-open {
        overflow: hidden !important;
        height: 100% !important;
        overscroll-behavior: none;
    }

    body.pa-auth-modal-open {
        position: static !important;
        width: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
    }
}

@media (max-width: 720px) {
    html.pa-page-materialy.pa-auth-modal-open,
    html.pa-page-materialy.pa-auth-modal-open body {
        overflow: hidden !important;
        height: 100% !important;
        max-height: none !important;
        overscroll-behavior: none;
        touch-action: none;
    }
}

/* Komunita: mobilní layout stránky nesmí rozbít auth modal */
body.pa-page-sk-komunita.pa-auth-modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

@media (min-width: 721px) {
    body.pa-page-sk-komunita.pa-auth-modal-open {
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
}

@media (max-width: 720px) {
    body.pa-page-sk-komunita.pa-auth-modal-open,
    body.pa-page-sk-komunita.pa-auth-modal-open.pa-sk-mobile-app,
    body.pa-page-sk-komunita.pa-auth-modal-open.pa-sk-tab-page-scroll {
        position: static !important;
        top: auto !important;
        width: auto !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
    }
}

#authModal.pa-modal-overlay.is-open {
    touch-action: manipulation;
}

#authModal.pa-modal-overlay {
    z-index: 2147483000;
    isolation: isolate;
}

#authModal .pa-modal-box {
    animation: none;
}

/* Autofill nesmí hýbat layoutem modalu (focus jump / yellow flash). */
#authModal .pa-modal-box input[type="text"],
#authModal .pa-modal-box input[type="password"],
#authModal .pa-modal-box input[type="email"] {
    transform: none !important;
    transition: box-shadow 0.2s, background-color 0.2s, border-color 0.2s !important;
}

#authModal .pa-modal-box input[type="text"]:focus,
#authModal .pa-modal-box input[type="password"]:focus,
#authModal .pa-modal-box input[type="email"]:focus {
    transform: none !important;
}

#authModal .pa-modal-box input:-webkit-autofill,
#authModal .pa-modal-box input:-webkit-autofill:hover,
#authModal .pa-modal-box input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--pa-text, #3d363b) !important;
    caret-color: var(--pa-text, #3d363b) !important;
    box-shadow: 4px 4px 0 var(--pa-ink, #221e21), 0 0 0 1000px #ffffff inset !important;
    transition: background-color 99999s ease-out !important;
    transform: none !important;
}

#authModal.is-keyboard-open .pa-modal-box {
    transition: none;
}

#authModal.pa-modal-overlay.is-open {
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

#authModal .pa-modal-box {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 24px;
    touch-action: pan-y;
}

#authModal .pa-modal-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#authModal .pa-modal-tabs {
    display: flex !important;
    align-items: stretch;
    position: relative;
    z-index: 30;
    isolation: isolate;
    pointer-events: auto !important;
    gap: 4px;
    min-height: 52px;
    cursor: default;
    box-sizing: border-box;
}

#authModal .pa-tab-btn {
    flex: 1 1 50%;
    min-width: 0;
    width: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 44px;
    padding: 12px 10px;
    box-sizing: border-box;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
}

#authModal .pa-auth-reg-done__cta,
#authModal .pa-auth-reg-done__ghost {
    touch-action: manipulation;
    min-height: 44px;
}

@media (max-width: 720px) {
    #authModal.pa-modal-overlay.is-open {
        display: flex !important;
        position: fixed !important;
        inset: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        width: 100% !important;
        height: 100% !important;
        min-height: 100dvh !important;
        max-height: none !important;
        box-sizing: border-box;
    }

    #authModal .pa-modal-box {
        flex: 0 1 auto !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        isolation: isolate;
        width: min(calc(100vw - 24px), 26.5rem) !important;
        max-width: min(calc(100vw - 24px), 26.5rem) !important;
        margin: auto !important;
        border-radius: 22px;
        border-width: 3px;
        border-bottom: 3px solid var(--pa-ink, #221e21);
        box-shadow: 10px 10px 0 var(--pa-ink, #221e21);
        padding: 12px 16px max(18px, env(safe-area-inset-bottom));
        max-height: min(92dvh, 42rem) !important;
        min-height: 0;
        height: auto !important;
        animation: paAuthModalInMobile 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    #authModal .pa-modal-close {
        position: absolute !important;
        top: max(8px, env(safe-area-inset-top));
        right: 10px;
        z-index: 1000 !important;
        pointer-events: auto !important;
    }

    #authModal .pa-modal-brand,
    #authModal .pa-modal-tabs {
        flex: 0 0 auto;
        position: relative;
        z-index: 8;
        flex-shrink: 0;
        background: var(--pa-bg-card, #fffdf8);
    }

    #authModal .pa-modal-brand {
        padding-right: 2.75rem;
    }

    #authModal .pa-modal-tabs {
        touch-action: manipulation;
        pointer-events: auto;
        position: relative;
        z-index: 20;
    }

    #authModal .pa-modal-close-bar {
        position: relative;
        z-index: 30;
    }

    #authModal .pa-tab-btn {
        position: relative;
        z-index: 6;
        pointer-events: auto;
        cursor: pointer;
    }

    #authModal .pa-modal-content-area.active:not([hidden]) {
        flex: 0 0 auto;
        min-height: 0;
        overflow: visible;
        touch-action: manipulation;
        position: relative;
        z-index: 1;
        pointer-events: auto !important;
        height: auto !important;
        max-height: none !important;
    }

    #authModal .pa-modal-content-area[hidden] {
        display: none !important;
        flex: 0 0 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #authModal.is-keyboard-open .pa-modal-box {
        max-height: min(88dvh, calc(var(--pa-auth-vv-height, 88dvh) - 12px)) !important;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }

    #authModal.is-keyboard-open .pa-modal-box.pa-modal-box--register {
        max-height: min(90dvh, calc(var(--pa-auth-vv-height, 90dvh) - 8px)) !important;
    }

    #authModal .pa-modal-box::before {
        display: none;
    }

    #authModal .pa-modal-box.pa-modal-box--register {
        max-height: min(92dvh, 42rem) !important;
    }

    #authModal .pa-modal-close {
        top: max(8px, env(safe-area-inset-top));
        right: 10px;
        border: 2px solid var(--pa-ink, #221e21);
        border-radius: 50%;
        background: #fff;
        font-size: 1.25rem;
        line-height: 1;
        box-shadow: 3px 3px 0 var(--pa-ink, #221e21);
    }

    #authModal .pa-modal-close-bar {
        display: flex;
        justify-content: flex-end;
        flex: 0 0 auto;
        margin: -0.35rem 0 0.15rem;
        position: relative;
        z-index: 1001;
        pointer-events: none;
    }

    #authModal .pa-modal-close-bar .pa-modal-close {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        pointer-events: auto !important;
    }

    #authModal .pa-modal-brand {
        margin-bottom: 10px;
    }

    #authModal .pa-modal-brand__tag {
        font-size: 0.8rem;
    }

    #authModal .pa-modal-tabs {
        margin-bottom: 14px;
        border-width: 2px;
        padding: 4px;
    }

    #authModal .pa-tab-btn {
        padding: 10px 8px;
        font-size: 0.88rem;
    }

    #authModal .pa-tab-btn.active {
        border-width: 2px;
    }

    #authModal .pa-modal-title {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    #authModal .pa-modal-subtitle {
        font-size: 0.82rem;
        line-height: 1.45;
        margin-bottom: 14px;
    }

    #authModal #modal-content-register > .pa-modal-title,
    #authModal #modal-content-register > .pa-modal-subtitle {
        text-align: left;
    }

    #authModal .pa-modal-box input[type="text"],
    #authModal .pa-modal-box input[type="password"],
    #authModal .pa-modal-box input[type="email"] {
        font-size: 16px !important;
        padding: 14px 16px !important;
        margin-bottom: 12px !important;
        border-width: 2px !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        box-shadow: 3px 3px 0 var(--pa-ink, #221e21) !important;
    }

    #authModal .pa-modal-box input[type="text"]:focus,
    #authModal .pa-modal-box input[type="password"]:focus,
    #authModal .pa-modal-box input[type="email"]:focus {
        transform: none !important;
        background: #ffffff !important;
        box-shadow: 4px 4px 0 var(--pa-ink, #221e21) !important;
    }

    #authModal .pa-modal-box input[type="submit"],
    #authModal .pa-modal-box button[type="submit"] {
        min-height: 48px;
        padding: 14px 16px !important;
        font-size: 0.98rem !important;
        border-width: 2px !important;
        margin-top: 4px !important;
    }

    #authModal .pa-modal-box input[type="submit"]:hover,
    #authModal .pa-modal-box button[type="submit"]:hover {
        transform: none !important;
    }

    #authModal .pa-modal-box .swpm-password-toggle-checkbox-label,
    #authModal .pa-modal-box .swpm-password-toggle-label,
    #authModal .pa-modal-box .swpm-rememberme-label,
    #authModal .pa-modal-box .swpm-remember-label,
    #authModal .pa-modal-box .swpm-rember-label {
        font-size: 0.9rem !important;
    }

    #authModal .pa-modal-box .swpm-password-input-visibility input[type="checkbox"],
    #authModal .pa-modal-box .swpm-remember-me input[type="checkbox"],
    #authModal .pa-modal-box .swpm-login-remember-me-tr td input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
    }

    #authModal .pa-reg-consent {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    #authModal .pa-reg-consent label {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }

    #authModal .pa-reg-consent input[type="checkbox"] {
        width: 22px;
        height: 22px;
        margin-top: 2px;
        flex-shrink: 0;
    }

    #authModal .pa-auth-help {
        margin-top: 0.65rem;
        padding-top: 0.55rem;
    }

    #authModal .pa-auth-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    #authModal .pa-auth-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.45rem 0.9rem;
        border-radius: 999px;
        text-decoration: none;
        background: #fff;
        border: 2px solid var(--pa-ink, #221e21);
        box-shadow: 3px 3px 0 var(--pa-ink, #221e21);
        color: var(--pa-ink, #221e21) !important;
    }

    #authModal .pa-auth-reg-done {
        padding: 0.15rem 0 0.25rem;
    }

    #authModal .pa-auth-reg-done__cta {
        max-width: none;
    }

    #authModal .pa-modal-box.pa-modal-box--reg-success {
        padding-top: max(14px, env(safe-area-inset-top));
    }
}

@keyframes paAuthModalInMobile {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes paAuthSheetUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
    #authModal .pa-modal-box {
        animation: none;
    }
}

@media (min-width: 721px) {
    #authModal .pa-modal-box {
        max-height: min(88vh, 820px);
    }

    #authModal .pa-modal-box::before {
        display: none;
    }
}
