.welcome-page {
    min-height: 100vh;
    background: #f2f4f9;
}

.portal--welcome {
    --welcome-navy: #071942;
    --welcome-inset-start: max(1rem, env(safe-area-inset-left));
    --welcome-inset-end: max(1rem, env(safe-area-inset-right));
    width: min(100%, 31rem);
    padding: 0 0 max(1rem, env(safe-area-inset-bottom));
    color: #132449;
    font-family: Anuphan, "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
}

.portal--welcome .brand {
    margin: 0;
    padding: calc(max(.875rem, env(safe-area-inset-top)) + .25rem) var(--welcome-inset-end) .75rem var(--welcome-inset-start);
    background: var(--welcome-navy);
}

.portal--welcome .brand-mark {
    width: 4rem;
    mix-blend-mode: screen;
}

.portal--welcome .brand-mark img {
    filter: grayscale(1) invert(1) contrast(3);
}

.portal--welcome .brand-name {
    border-color: #ffffff60;
    color: #fff;
    font-size: .95rem;
}

.welcome {
    display: grid;
}

.welcome-art {
    position: relative;
    aspect-ratio: 7 / 4;
    overflow: hidden;
    background: var(--welcome-navy);
}

.welcome-art img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.welcome-art::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--welcome-navy), transparent 24%);
    pointer-events: none;
    content: "";
}

.welcome-signin {
    position: relative;
    margin: -1rem var(--welcome-inset-end) 0 var(--welcome-inset-start);
    padding: clamp(1.15rem, 5vw, 1.75rem);
    border: 1px solid #dde3ef;
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 .45rem 1.5rem #1324490d;
}

.welcome-signin h1 {
    font-size: clamp(1.5rem, 7.1vw, 2.125rem);
    line-height: 1.3;
}

.welcome-description {
    margin-top: .45rem;
    color: #4b5b75;
    font-size: 1rem;
    line-height: 1.6;
}

.welcome-actions {
    margin-top: 1.2rem;
}

.line-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    width: 100%;
    min-height: 3.375rem;
    padding: .625rem .75rem;
    border: 1px solid transparent;
    border-radius: .75rem;
    background: #08783e;
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
}

.line-login:enabled:hover { background: #076735; }
.line-login:enabled:active { background: #06562e; }

.line-login:focus-visible {
    outline-color: #08783e;
}

.line-login:disabled {
    background: #eaf2ed;
    border-color: #d5e4db;
    color: #40594b;
    cursor: not-allowed;
}

#line-signin:disabled {
    border-color: transparent;
    background: #347958;
    color: #fff;
    cursor: wait;
}

.line-login-icon {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: 1.6rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #fff;
    color: #08783e;
    font: 700 .48rem/1 Arial, sans-serif;
}

.line-login-icon::after {
    position: absolute;
    top: calc(100% - .17rem);
    left: .55rem;
    border-top: .35rem solid #fff;
    border-right: .35rem solid transparent;
    content: "";
}

.welcome-status,
.welcome-actions noscript {
    display: block;
    margin-top: .65rem;
    color: #4b5b75;
    font-size: .875rem;
    line-height: 1.5;
}

.line-connecting {
    position: fixed;
    z-index: 10;
    inset: 0;
    display: grid;
    place-items: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: radial-gradient(ellipse at 50% 45%, #1c3970 0, #071942 64%);
    color: #fff;
    font-family: Anuphan, "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
    text-align: center;
}

.line-connecting-content {
    display: grid;
    justify-items: center;
    gap: 1.15rem;
    font-size: 1rem;
    font-weight: 600;
}

.line-connecting-mark {
    display: grid;
    place-items: center;
    width: 7.5rem;
    height: 4.5rem;
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 .8rem 2.5rem #040d2970;
}

.line-connecting-track {
    display: block;
    width: 6rem;
    height: .22rem;
    overflow: hidden;
    border-radius: 1rem;
    background: #ffffff35;
}

.line-connecting-track::before {
    display: block;
    width: 42%;
    height: 100%;
    margin-inline: auto;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff536d, #ffaea3);
    content: "";
}

@media (prefers-reduced-motion: no-preference) {
    .line-connecting-track::before {
        animation: line-connecting-sweep 1.5s ease-in-out infinite alternate;
    }
}

@keyframes line-connecting-sweep {
    from { transform: translateX(-70%); }
    to { transform: translateX(70%); }
}

.portal--welcome .portal-footer {
    margin: 1.125rem var(--welcome-inset-end) 0 var(--welcome-inset-start);
}

.portal--welcome .portal-footer a {
    color: #4b5b75;
    text-underline-offset: .18em;
}

@media (min-width: 52rem) {
    .portal--welcome {
        width: min(100% - 4rem, 66rem);
        padding-top: clamp(2rem, 7vh, 5rem);
    }

    .portal--welcome .brand {
        padding: 1.25rem 1.5rem;
        border-radius: 1.25rem 1.25rem 0 0;
    }

    .welcome {
        grid-template-columns: 1.2fr 1fr;
        align-items: stretch;
    }

    .welcome-art {
        aspect-ratio: auto;
        min-height: 21rem;
        border-bottom-left-radius: 1.25rem;
    }

    .welcome-signin {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin: 0;
        padding: clamp(1.75rem, 4vw, 3rem);
        border-radius: 0 0 1.25rem 0;
    }

    .welcome-signin h1 {
        font-size: clamp(1.55rem, 3vw, 2.125rem);
    }
}
