.cg-auth{display:grid;gap:14px;margin-top:14px}.cg-auth button,.cg-auth input{font:inherit}.cg-auth__form{display:grid;gap:12px}.cg-auth__form label{display:grid;gap:6px;color:#d8deed;font-weight:500}.cg-auth__form input{width:100%;height:44px;border:1px solid #444b61;border-radius:8px;background:#171923;color:#fff;padding:0 12px;outline:none}.cg-auth__form input:focus{border-color:#8068ff;box-shadow:0 0 0 3px rgba(128,104,255,.2)}.cg-auth__form>button,.cg-auth__social,.cg-auth__guest{min-height:44px;border:0;border-radius:8px;padding:0 16px;font-weight:600;cursor:pointer}.cg-auth__form>button{background:#6c55e8;color:#fff}.cg-auth__social{background:#fff;color:#171923}.cg-auth__guest{background:#292d3c;color:#fff}.cg-auth button:disabled{opacity:.55;cursor:not-allowed}.cg-auth__divider{display:flex;align-items:center;gap:10px;color:#9299ac}.cg-auth__divider:before,.cg-auth__divider:after{content:"";height:1px;flex:1;background:#35394b}.cg-auth__links{display:flex;justify-content:space-between;gap:12px}.cg-auth__links button{border:0;background:none;color:#ad9fff;padding:2px;cursor:pointer}.cg-auth__code{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.cg-auth__code>button{height:44px;border:1px solid #555d76;border-radius:8px;background:#292d3c;color:#fff;padding:0 12px}.cg-auth__error{border:1px solid #8e3d4b;border-radius:8px;background:#3a2028;color:#ffd8df;padding:10px 12px}@media(max-width:520px){.cg-auth__code{grid-template-columns:1fr}.cg-auth__links{flex-direction:column;align-items:flex-start}}

/* Shared panel for sign-in, registration and password reset. */
.cg-modal__panel:has([data-auth-root]) {
    --login-inset: clamp(20px, 4vw, 30px);
    width: min(420px, 100%);
    max-height: calc(100dvh - 40px);
    padding: 0 var(--login-inset) 20px;
    border-radius: 28px;
}
.cg-modal__panel:has([data-auth-root])::before {
    content: "";
    display: block;
    height: clamp(168px, 30dvh, 252px);
    margin-inline: calc(-1 * var(--login-inset));
    background:
        linear-gradient(to bottom, transparent 80%, var(--cg-surface)),
        var(--cg-auth-hero-image, none) center 61% / cover no-repeat;
}
.cg-modal__panel:has([data-auth-root]) .cg-modal__close {
    background: var(--cg-surface);
    border-radius: 50%;
    corner-shape: round;
}
.cg-modal__panel:has([data-auth-root]) .cg-modal__eyebrow {
    display: none;
}
.cg-modal__panel:has([data-auth-root]) h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 30px);
    line-height: 1.2;
}
.cg-modal__panel:has([data-auth-root]) > p {
    margin: 6px 0 14px;
    color: var(--cg-muted);
    line-height: 1.5;
}
.cg-auth[data-auth-root] {
    gap: 10px;
    margin-top: 0;
}
.cg-auth[data-auth-root] [data-auth-message]:empty { display: none; }
.cg-auth[data-auth-root] .cg-auth__form {
    gap: 10px;
}
.cg-auth[data-auth-root] :is(input, .cg-auth__form > button, .cg-auth__code > button, .cg-auth__guest, .cg-auth__social) {
    min-height: 46px;
    border-radius: 23px;
    corner-shape: superellipse(1.5);
}
.cg-auth[data-auth-root] input {
    padding-inline: 16px;
}
.cg-auth[data-auth-root] .cg-auth__links {
    flex-flow: row wrap;
    align-items: center;
    gap: 4px 12px;
}

/* Leave more room for the verification fields on the follow-up screens. */
.cg-modal__panel:has(.cg-auth__code)::before {
    height: clamp(144px, 24dvh, 196px);
}
.cg-auth[data-auth-root] [data-auth-view="login"] {
    margin-inline: auto;
}

.cg-modal__panel:has(.cg-auth__account) {
    width: min(420px, 100%);
    padding: clamp(20px, 4vw, 24px);
    border: 1px solid var(--cg-stroke);
}
.cg-modal__panel:has(.cg-auth__account) h2 {
    margin: 0 0 20px;
    padding-inline-end: 38px;
    font-size: 20px;
    line-height: 1.3;
}
.cg-auth__account-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    background: var(--cg-surface-2);
    border-radius: var(--cg-control-radius);
}
[data-theme="light"] .cg-auth__account-profile {
    background: #f5f5f5;
}
.cg-auth__account-avatar {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 48px;
    block-size: 48px;
}
.cg-auth__account-avatar .cg-account-avatar { transform: scale(1.5); }
.cg-auth__account-identity {
    min-inline-size: 0;
    overflow-wrap: anywhere;
}
.cg-auth__account-identity strong {
    font-size: 16px;
    font-weight: 600;
}
.cg-auth__account-identity p {
    margin: 2px 0 0;
    color: var(--cg-muted);
    font-size: 13px;
    line-height: 1.5;
}
.cg-auth__account-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-block-start: 18px;
}
.cg-auth__account-actions button {
    font: inherit;
    background: transparent;
    cursor: pointer;
}
.cg-auth__account-actions [data-auth-logout] {
    min-block-size: 40px;
    margin-inline-start: auto;
    padding: 8px 14px;
    border: 1px solid var(--cg-stroke);
    border-radius: 12px;
    color: var(--cg-text);
    font-weight: 500;
}
.cg-auth__account-actions [data-auth-logout]:is(:hover, :focus-visible) { background: var(--cg-surface-2); }
.cg-auth__account-actions [data-auth-delete] {
    min-block-size: 36px;
    padding: 4px 0;
    border: 0;
    color: #a12e44;
    font-size: 13px;
}
[data-theme="dark"] .cg-auth__account-actions [data-auth-delete] { color: #f4a8b7; }
.cg-auth__account-actions [data-auth-delete]:is(:hover, :focus-visible) { text-decoration: underline; }
