:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background: #1d1d1f;
    color: #f5f5f7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background:
        radial-gradient(circle at 50% -18%, rgba(255, 55, 95, .12), transparent 38%),
        #1d1d1f;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: max(42px, env(safe-area-inset-top)) 24px max(44px, env(safe-area-inset-bottom));
}

.login-card {
    width: min(100%, 560px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-brand {
    width: 92px;
    height: 92px;
    border-radius: 23px;
    display: grid;
    place-items: center;
    margin-bottom: 31px;
    background: linear-gradient(155deg, #ff5a7e 0%, #fa233b 52%, #d81653 100%);
    border: 1px solid rgba(255, 255, 255, .34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .42),
        0 16px 40px rgba(0, 0, 0, .28);
}

.login-playback-bars {
    display: block;
    width: 48px;
    height: 48px;
    overflow: visible;
    fill: #fff;
    filter: drop-shadow(0 2px 4px rgba(105, 0, 26, .2));
}

.login-playback-bar {
    transform-box: fill-box;
    transform-origin: center bottom;
}

.login-playback-bar--1 { animation: loginPlaybackBar 760ms ease-in-out -420ms infinite alternate; }
.login-playback-bar--2 { animation: loginPlaybackBar 920ms ease-in-out -180ms infinite alternate; }
.login-playback-bar--3 { animation: loginPlaybackBar 680ms ease-in-out -520ms infinite alternate; }
.login-playback-bar--4 { animation: loginPlaybackBar 840ms ease-in-out -300ms infinite alternate; }

@keyframes loginPlaybackBar {
    0% { transform: scaleY(.28); }
    55% { transform: scaleY(1); }
    100% { transform: scaleY(.52); }
}


.login-copy h1 {
    margin: 0;
    font-size: clamp(31px, 6vw, 43px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 720;
}

.login-copy p {
    max-width: 490px;
    margin: 24px auto 0;
    color: #98989d;
    font-size: clamp(18px, 3.5vw, 23px);
    line-height: 1.42;
    letter-spacing: -.012em;
}

.login-alert {
    width: min(100%, 420px);
    margin: 24px 0 0;
    padding: 12px 15px;
    border: 1px solid rgba(255, 69, 96, .42);
    border-radius: 14px;
    background: rgba(255, 55, 95, .1);
    color: #ffb2bf;
    font-size: 14px;
    line-height: 1.45;
}

.login-form {
    width: min(100%, 420px);
    margin-top: 34px;
    overflow: hidden;
}

.login-step {
    width: 100%;
    transition: opacity .24s ease, transform .28s cubic-bezier(.22, .75, .24, 1), max-height .28s ease;
}

.login-step-id {
    opacity: 1;
    transform: translateX(0);
    max-height: 180px;
}

.login-step-password {
    opacity: 0;
    transform: translateX(35px);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.login-form.is-password-step .login-step-id {
    opacity: 0;
    transform: translateX(-35px);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.login-form.is-password-step .login-step-password {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    max-height: 230px;
    overflow: visible;
}

.login-input {
    width: 100%;
    height: 62px;
    border: 1.5px solid #68686e;
    border-radius: 16px;
    outline: none;
    padding: 0 19px;
    background: rgba(46, 46, 49, .52);
    color: #f5f5f7;
    font-size: 20px;
    letter-spacing: -.01em;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input::placeholder {
    color: #89898f;
    opacity: 1;
}

.login-input:focus {
    border-color: #ff375f;
    background: rgba(50, 50, 53, .78);
    box-shadow: 0 0 0 4px rgba(255, 55, 95, .14);
}

.password-field {
    position: relative;
}

.password-field .login-input {
    padding-right: 100px;
}

.password-toggle {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    padding: 8px 9px;
    background: transparent;
    color: #ff5b78;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.password-toggle:focus-visible,
.login-back:focus-visible {
    outline: 2px solid #ff5b78;
    outline-offset: 2px;
}

.login-back {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: -8px 0 12px;
    border: 0;
    background: transparent;
    color: #a7a7ac;
    cursor: pointer;
    font-size: 15px;
}

.login-back > span:first-child {
    font-size: 25px;
    line-height: 1;
    transform: translateY(-1px);
}

.login-back-id {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field-error {
    min-height: 20px;
    margin: 7px 3px 4px;
    color: #ff8ca0;
    font-size: 13px;
    text-align: left;
}

.login-button {
    position: relative;
    width: 100%;
    height: 58px;
    display: grid;
    place-items: center;
    margin-top: 9px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(180deg, #ff375f, #fa233b);
    color: #fff;
    font-size: 20px;
    font-weight: 610;
    letter-spacing: -.012em;
    box-shadow: 0 12px 28px rgba(250, 35, 59, .17);
    cursor: pointer;
    transition: transform .14s ease, filter .14s ease, opacity .14s ease;
}

.login-button:hover {
    filter: brightness(1.06);
}

.login-button:active {
    transform: scale(.985);
}

.login-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .76);
    outline-offset: 3px;
}

.button-spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, .38);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin .75s linear infinite;
}

.login-form.is-submitting .button-label {
    display: none;
}

.login-form.is-submitting .button-spinner {
    display: block;
}

.login-form.is-submitting .login-button,
.login-form.is-submitting .login-input,
.login-form.is-submitting .password-toggle,
.login-form.is-submitting .login-back {
    pointer-events: none;
}

.login-security {
    max-width: 490px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 54px;
    color: #c5c5ca;
}

.login-security p {
    margin: 0;
    font-size: 14px;
    line-height: 1.52;
}

.security-icon {
    position: relative;
    width: 40px;
    height: 26px;
}

.security-icon span {
    position: absolute;
    bottom: 1px;
    width: 18px;
    height: 17px;
    border-radius: 9px 9px 4px 4px;
    background: #ff375f;
}

.security-icon span::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: -8px;
    left: 5px;
    background: inherit;
}

.security-icon span:first-child {
    left: 3px;
}

.security-icon span:last-child {
    right: 3px;
    opacity: .48;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
    .login-page {
        place-items: start center;
        padding-left: 28px;
        padding-right: 28px;
        padding-top: max(68px, calc(env(safe-area-inset-top) + 38px));
    }

    .login-brand {
        width: 82px;
        height: 82px;
        border-radius: 21px;
        margin-bottom: 29px;
    }

    .login-playback-bars {
        width: 43px;
        height: 43px;
    }

    .login-copy p {
        margin-top: 21px;
    }

    .login-form {
        margin-top: 31px;
    }

    .login-input {
        height: 59px;
        font-size: 18px;
    }

    .login-button {
        height: 56px;
        font-size: 19px;
    }

    .login-security {
        margin-top: 47px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
