html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

html {
    background: linear-gradient(to bottom, #9ecfec 0%, #cbe6f6 45%, #f5fbfd 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100%;
}

body.loginBg {
    background: linear-gradient(to bottom, #9ecfec 0%, #cbe6f6 45%, #f5fbfd 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100%;
    height: auto;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-sizing: border-box;
}
.loginMainContent {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    margin: 0 auto;
    background: transparent;
    background-color: transparent;
    box-shadow: none;
    border: none;
    overflow: visible;
}

body.loginBg::after{
    content: "";
    position: absolute;
    right: 1.5vw;
    bottom: 1.5vh;
    width: 22vw;
    height: 11vw;
    max-width: 320px;
    max-height: 160px;
    z-index: 2;
    background-image: url('../img/navic-logo.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    pointer-events: none;
}

@media (max-width: 600px) {
    body.loginBg {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    body.loginBg::after {
        position: static;
        order: 1;
        width: 30vw;
        height: 15vw;
        margin: 20px auto 0;
    }
}

/* Fallback: drop the corner logo below the box only right before it would
   actually overlap (short viewport height), not on every zoom-in. */
@media (max-height: 620px) {
    body.loginBg {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    body.loginBg::after {
        position: static;
        order: 1;
        width: 30vw;
        height: 15vw;
        margin: 20px auto 0;
    }
}

.loginTitle {
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 360px;
    height: 92px;
    box-sizing: border-box;
    background: url('../img/soramieNameLogo.png') no-repeat center bottom;
    background-size: auto 93px;
}
.loginTitle img {
    width: 100%;
    max-width: 110px;
    height: auto;
    object-fit: contain;
}

.loginBoxGray {
    background: linear-gradient(to bottom, #fbfcfd 0%, #e3e8ec 100%);
    background-repeat: no-repeat;
    border: 3px solid #1d4e78;
    border-radius: 20px;
    padding: 30px 40px 35px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    position: relative;
    z-index: 3;
}
.loginNotes {
    display: none;
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #1d4e78;
}
.loginNotes p {
    margin: 0;
    white-space: nowrap;
}
.loginNotes a {
    color: #1d4e78;
    text-decoration: underline;
}

.loginBoxGray::after{
    content: none;
}

.loginBoxGray .loginTitleText{
    margin: 0 0 20px;
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    color: #1d4e78;
}
.loginBoxGray:has(input[type="text"], input[type="password"]):not(:has(.loginTitleText))::before{
    content: "Login";
    display: block;
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    color: #1d4e78;
    margin-bottom: 18px;
}

.logoutMessage{
    margin: 0 0 22px;
    font-size: 15px;
    color: #1d4e78;
    line-height: 1.6;
}

.loginTextBox{ width:100%; box-sizing:border-box; display:flex; flex-direction:column; align-items:center }
.loginTextBox input[type="text"],
.loginTextBox input[type="password"]{
    width:360px;
    max-width:92%;
    height:48px;
    display:block;
    margin: 10px 0;
    padding: 0 18px;
    border-radius: 10px;
    border: none;
    background:#e9edf0;
    color:#4a6d8c;
    font-size:14px;
    text-align:center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.loginTextBox input::placeholder{ color:#9aa9b6; text-align:center }

.loginSave{ width:100%; max-width:360px; display:flex; align-items:center; gap:8px; margin:12px 0 18px 6px; color:#58636c; font-size:13px }
.loginSave input[type="checkbox"]{ width:16px; height:16px }
.checkbox-label{ margin-left:6px }
.loginButtonRight{ width:100%; max-width:360px; display:flex; justify-content:flex-end; box-sizing:border-box }
.loginButton{ display:inline-block; padding:2px 28px; background:#1d4e78; color:#fff; border-radius:8px; border:none; cursor:pointer; box-shadow:0 6px 10px rgba(0,0,0,0.12); white-space:nowrap; box-sizing:border-box; max-width:100%; user-select:none }
.loginButton:hover{ background:#163c5e }

.loginButton[onclick]{
    display:flex;
    align-items:center;
    justify-content:center;
    margin-left:auto;
    margin-right:auto;
}
#backLogin.loginButton[onclick]{
    width: 100%;
    max-width: 360px;
}
.loginButton a{ display:inline-block; color:#fff; text-decoration:none; white-space:nowrap }

.loginBoxGray a.loginButton{ display:block; width:100%; box-sizing:border-box; text-align:center; padding:12px 18px }
.val_error_list{
    display: block;
    color: #c0392b;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    box-sizing: border-box;
    width: max-content;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

@media (max-height: 550px) {
    body.loginBg {
        padding: 40px 0 0;
    }
}

html body #container .loginMainContent,
#container .loginMainContent,
.loginMainContent.loginMainContent,
.loginMainContent {
	display: block;
	width: auto;
	max-width: none;
	background: transparent;
	background-color: transparent;
	padding: 0;
	margin: 0 auto;
	box-shadow: none;
	border: none;
}

html body #container .loginMainContent .loginBoxGray,
#container .loginMainContent .loginBoxGray,
.loginMainContent .loginBoxGray {
	margin: 0 auto;
}

html body #container .loginNotes p a,
#container .loginNotes p a,
body #container .loginNotes p a,
.loginNotes p a.loginNotesLink,
.loginNotes p a {
	color: #1d4e78;
}

