/* 画面レイアウト・入力欄・レスポンシブ設定 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f4f7fb;
    font-family: Segoe UI,sans-serif;
    color: #263244;
}

main {
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    background: white;
    border: 1px solid #e5eaf0;
    border-radius: 16px;
    box-shadow: 0 12px 48px #142d5010;
}

img {
    width: 70%;
    display: block;
    margin: auto;
}

#login { margin-top: 48px; }

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

input,button {
    width: 100%;
    height: 52px;
    border-radius: 8px;
    font-size: 16px;
}

input {
    padding: 0 16px;
    border: 1px solid #dce2ea;
    background: #f8fafc;
    margin-bottom: 24px;
}

input:focus {
    outline: 2px solid #008cf0;
}

button {
    border: 0;
    background: linear-gradient(135deg,#009cf5,#0078df);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

footer {
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 40px;
}

@media(max-width:480px) {
    main {
        padding: 32px 24px;
    }
}


#loginNotice { margin: 0 0 10px; color: #9e303c; font-size: 12px; line-height: 1.5; }
#login input[aria-invalid="true"] { background: #fff0f1; border-color: #d99099; }
.password-field { position: relative; }
.password-field input { padding-right: 54px; }
#passwordToggle {
    position: absolute; top: 4px; right: 4px; width: 44px; height: 44px;
    display: grid; place-items: center; padding: 0; background: transparent; color: #52647a;
}
#passwordToggle svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#passwordToggle .eye-slash { display: none; }
#passwordToggle[aria-pressed="true"] .eye-slash { display: block; }
@keyframes login-shake {
    0%, 100% { transform: translateX(0); }
    25%, 75% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: no-preference) {
    .login-shake { animation: login-shake .3s ease-out; }
}
@media (max-width: 480px) { #login { margin-top: 32px; } }
@media (max-height: 620px) {
    body { padding-block: clamp(8px, 3svh, 24px); }
    main { padding-block: clamp(16px, 5svh, 32px); }
    #login { margin-top: clamp(18px, 5svh, 32px); }
    footer { margin-top: clamp(16px, 5svh, 32px); }
}

.login-cms-badge {
    display: table;
    max-width: 100%;
    margin: 10px auto 0;
    padding: 3px 12px;
    border: 1px solid #d5e6f3;
    border-radius: 999px;
    background: #eff6fc;
    color: #12618e;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}
.login-cms-badge + #login { margin-top: 20px; }
@media (max-height: 620px) {
    .login-cms-badge + #login { margin-top: 12px; }
}

#login button[type="submit"]:disabled { position: relative; color: transparent; }
#login button[type="submit"]:disabled::after {
    content: ""; position: absolute; inset: 0; margin: auto;
    width: 24px; height: 24px; border: 3px solid #ffffff70;
    border-top-color: #fff; border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
    #login button[type="submit"]:disabled::after { animation: login-loading-spin .8s linear infinite; }
}
@keyframes login-loading-spin { to { transform: rotate(360deg); } }

/* 季節の装飾を固定レイヤーに置き、OFFと同じグリッドでログイン枠を配置する。 */
.login-theme-scene {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
