body.theme-aquamarine:has(.aq-member-auth) {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

body.theme-aquamarine:has(.aq-member-auth) .aq-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.theme-aquamarine:has(.aq-member-auth) .aq-footer {
    margin-top: 0;
    border-top-color: color-mix(in srgb, var(--aq-line, #e6e6e6) 70%, #f7f7f7);
}

body.theme-aquamarine .aq-member-auth,
body.theme-aquamarine .aq-member-auth *,
body.theme-aquamarine .aq-member-auth *::before,
body.theme-aquamarine .aq-member-auth *::after {
    box-sizing: border-box;
}

body.theme-aquamarine .aq-member-auth {
    --aq-auth-ink: var(--theme-text, var(--aq-ink, #1a1a1a));
    --aq-auth-muted: var(--theme-text-muted, var(--aq-muted, #5c5c5c));
    --aq-auth-line: var(--theme-border, var(--aq-line, #e6e6e6));
    --aq-auth-blue: var(--aq-blue, var(--theme-accent, var(--theme-primary, #0084ff)));
    --aq-auth-blue-deep: color-mix(in srgb, var(--aq-auth-blue) 78%, #031018);
    --aq-auth-soft: var(--theme-surface-alt, var(--aq-soft, #f4f7fb));
    --aq-auth-surface: var(--theme-surface, #ffffff);
    --aq-auth-footer: #f7f7f7;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-bottom: -1px;
    padding: clamp(1.75rem, 5vw, 3.25rem) 1rem 0;
    color: var(--aq-auth-ink);
    background: var(--aq-auth-footer);
}

body.theme-aquamarine .aq-member-auth__atmosphere {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 12% -10%, color-mix(in srgb, var(--aq-auth-blue) 28%, transparent), transparent 55%),
        radial-gradient(90% 70% at 100% 10%, color-mix(in srgb, var(--aq-auth-blue) 16%, transparent), transparent 50%),
        linear-gradient(180deg, var(--aq-auth-soft) 0%, #fff 48%, var(--aq-auth-footer) 100%);
}

body.theme-aquamarine .aq-member-auth__atmosphere::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(color-mix(in srgb, var(--aq-auth-blue) 8%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--aq-auth-blue) 8%, transparent) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 20%, transparent 75%);
}

body.theme-aquamarine .aq-member-auth__atmosphere::after {
    content: "";
    position: absolute;
    width: min(28rem, 70vw);
    height: min(28rem, 70vw);
    right: -8%;
    top: 18%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--aq-auth-blue) 22%, transparent), transparent 68%);
    filter: blur(2px);
}

body.theme-aquamarine .aq-member-auth__stage {
    position: relative;
    z-index: 1;
    width: min(26.5rem, 100%);
    max-width: 100%;
    margin: auto;
    padding-bottom: clamp(1.5rem, 4vw, 2.25rem);
    display: grid;
    gap: 1.35rem;
    animation: aq-member-auth-rise 0.55s ease-out both;
}

body.theme-aquamarine .aq-member-auth--register .aq-member-auth__stage {
    width: min(38rem, 100%);
}

@keyframes aq-member-auth-rise {
    from {
        opacity: 0;
        transform: translateY(0.7rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.theme-aquamarine .aq-member-auth__brand {
    text-align: center;
    padding: 0.15rem 0.25rem 0;
}

body.theme-aquamarine .aq-member-auth__brand-name {
    margin: 0 0 0.85rem;
    font-size: clamp(1.85rem, 5.5vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--aq-auth-blue-deep);
}

body.theme-aquamarine .aq-member-auth__title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.2rem, 3.2vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--aq-auth-ink);
}

body.theme-aquamarine .aq-member-auth__lead {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.45;
    color: var(--aq-auth-muted);
}

body.theme-aquamarine .aq-member-auth__panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    background: color-mix(in srgb, var(--aq-auth-surface) 94%, transparent);
    border: 1px solid color-mix(in srgb, var(--aq-auth-blue) 14%, var(--aq-auth-line));
    border-radius: 16px;
    padding: clamp(1.2rem, 3.5vw, 1.55rem);
    box-shadow:
        0 1px 0 color-mix(in srgb, #fff 80%, transparent) inset,
        0 18px 40px color-mix(in srgb, var(--aq-auth-blue-deep) 8%, transparent);
    backdrop-filter: blur(8px);
    animation: aq-member-auth-panel 0.65s ease-out 0.08s both;
}

@keyframes aq-member-auth-panel {
    from {
        opacity: 0;
        transform: translateY(0.45rem) scale(0.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.theme-aquamarine .aq-member-auth__error,
body.theme-aquamarine .aq-member-auth__flash {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

body.theme-aquamarine .aq-member-auth__error {
    background: #fff1f1;
    border: 1px solid #f0c2c2;
    color: #8a1f1f;
}

body.theme-aquamarine .aq-member-auth__flash {
    background: color-mix(in srgb, var(--aq-auth-blue) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--aq-auth-blue) 28%, #fff);
    color: var(--aq-auth-blue-deep);
}

body.theme-aquamarine .aq-member-auth__form {
    display: grid;
    gap: 0.95rem;
    margin: 0;
    width: 100%;
    min-width: 0;
}

body.theme-aquamarine .aq-member-auth__field {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    min-width: 0;
    font: inherit;
    color: inherit;
}

body.theme-aquamarine .aq-member-auth__label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--aq-auth-ink) 88%, var(--aq-auth-muted));
}

body.theme-aquamarine .aq-member-auth__field input,
body.theme-aquamarine .aq-member-auth__field select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--aq-auth-line);
    border-radius: 10px;
    background: #fff;
    color: var(--aq-auth-ink);
    padding: 0.78rem 0.9rem;
    font: inherit;
    font-size: 1rem;
    line-height: 1.3;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.theme-aquamarine .aq-member-auth__field input[hidden],
body.theme-aquamarine .aq-member-auth__field select[hidden],
body.theme-aquamarine .aq-member-auth [hidden] {
    display: none !important;
}

body.theme-aquamarine .aq-member-auth__row {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

body.theme-aquamarine .aq-member-auth__row--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.theme-aquamarine .aq-member-auth__row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.theme-aquamarine .aq-member-auth__hint {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--aq-auth-muted);
}

body.theme-aquamarine .aq-member-auth__hint.is-invalid,
body.theme-aquamarine .aq-member-auth__field.is-invalid .aq-member-auth__hint {
    color: #8a1f1f;
}

body.theme-aquamarine .aq-member-auth__hint.is-valid,
body.theme-aquamarine .aq-member-auth__field.is-valid .aq-member-auth__hint {
    color: #1a7a4c;
}

body.theme-aquamarine .aq-member-auth__field input.is-invalid,
body.theme-aquamarine .aq-member-auth__field select.is-invalid,
body.theme-aquamarine .aq-member-auth__field.is-invalid input,
body.theme-aquamarine .aq-member-auth__field.is-invalid select {
    border-color: #c0392b;
}

body.theme-aquamarine .aq-member-auth__field input.is-valid,
body.theme-aquamarine .aq-member-auth__field select.is-valid,
body.theme-aquamarine .aq-member-auth__field.is-valid input:not(.is-invalid),
body.theme-aquamarine .aq-member-auth__field.is-valid select:not(.is-invalid) {
    border-color: color-mix(in srgb, #1a7a4c 55%, var(--aq-auth-line));
}

body.theme-aquamarine .aq-member-auth__switch--top {
    margin: 0 0 1rem;
    justify-content: flex-start;
}

body.theme-aquamarine .aq-member-auth__secret {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.theme-aquamarine .aq-member-auth__secret input {
    width: 100%;
    max-width: 100%;
    padding-right: 2.85rem;
}

body.theme-aquamarine .aq-member-auth__eye {
    appearance: none;
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--aq-auth-muted);
    cursor: pointer;
}

body.theme-aquamarine .aq-member-auth__eye:hover {
    color: var(--aq-auth-blue-deep);
    background: color-mix(in srgb, var(--aq-auth-blue) 8%, transparent);
}

body.theme-aquamarine .aq-member-auth__eye:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--aq-auth-blue) 45%, transparent);
    outline-offset: 1px;
}

body.theme-aquamarine .aq-member-auth__eye-icon {
    display: inline-flex;
    line-height: 0;
}

body.theme-aquamarine .aq-member-auth__eye-icon[hidden] {
    display: none !important;
}

body.theme-aquamarine .aq-member-auth__field input:hover,
body.theme-aquamarine .aq-member-auth__field select:hover {
    border-color: color-mix(in srgb, var(--aq-auth-blue) 35%, var(--aq-auth-line));
}

body.theme-aquamarine .aq-member-auth__field input:focus,
body.theme-aquamarine .aq-member-auth__field select:focus {
    outline: none;
    border-color: var(--aq-auth-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--aq-auth-blue) 22%, transparent);
}

body.theme-aquamarine .aq-member-auth__submit {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-top: 0.2rem;
    border: 0;
    border-radius: 10px;
    background: var(--aq-auth-blue);
    color: var(--theme-primary-contrast, #fff);
    padding: 0.85rem 1.1rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

body.theme-aquamarine .aq-member-auth__submit:hover {
    background: color-mix(in srgb, var(--aq-auth-blue) 88%, #000);
}

body.theme-aquamarine .aq-member-auth__submit:active {
    transform: translateY(1px);
}

body.theme-aquamarine .aq-member-auth__submit:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--aq-auth-blue) 40%, transparent);
    outline-offset: 2px;
}

body.theme-aquamarine .aq-member-auth__switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.55rem;
    margin: 1.05rem 0 0;
    font-size: 0.92rem;
    color: var(--aq-auth-muted);
}

body.theme-aquamarine .aq-member-auth__switch a {
    color: var(--aq-auth-blue-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.theme-aquamarine .aq-member-auth__switch a:hover {
    color: var(--aq-auth-blue);
}

body.theme-aquamarine .aq-member-auth__switch-sep {
    opacity: 0.45;
}

body.theme-aquamarine .aq-member-auth .sf-captcha {
    margin-top: 0.15rem;
}

body.theme-aquamarine .aq-member-auth .sf-captcha.is-invalid {
    outline: 2px solid #c0392b;
    outline-offset: 6px;
    border-radius: 8px;
}

body.theme-aquamarine .aq-member-auth .sf-captcha__hint {
    margin: 0.55rem 0 0;
    color: #8a1f1f;
    font-size: 0.86rem;
}

@media (prefers-reduced-motion: reduce) {
    body.theme-aquamarine .aq-member-auth__stage,
    body.theme-aquamarine .aq-member-auth__panel {
        animation: none;
    }
}

@media (max-width: 720px) {
    body.theme-aquamarine .aq-member-auth__row--2,
    body.theme-aquamarine .aq-member-auth__row--3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body.theme-aquamarine .aq-member-auth {
        padding-inline: 0.85rem;
    }

    body.theme-aquamarine .aq-member-auth__panel {
        border-radius: 14px;
        padding: 1.1rem 1rem 1.2rem;
    }
}