*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --max-w: 1200px;
    --page-pad: 20px;
    --gap-lg: 24px;
    --accent: #5D86B1;
    --sub: #4B5563;
    --bg: #E6E9F0;
    --muted: #4B5563;
    --middle-min: 420px;
    --top-block: 224px;
    --bottom-block: 200px;
}

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body {
    overflow-x: hidden !important;
    background: var(--bg) !important;
}

#container {
    position: unset !important;
    top: unset !important;
    left: unset !important;
    z-index: auto !important;
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100dvh !important;
    margin: 0 0 0 unset !important;
    margin-top: unset !important;
    margin-left: unset !important;
    overflow: visible !important;
    background: unset !important;
    box-shadow: unset !important;
    container-type: size;
    visibility: hidden;
}

.header-section,
.footer-section {
    position: relative;
    flex: 0 0 auto;
    height: 112px;
    padding: 0 0 88px;
}

.header-section {
    margin: 0 0 64px;
}

.header-section > img {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 32px auto 8px;
}

.header-divider,
.footer-divider {
    position: absolute;
    height: 6px;
    background-color: var(--accent);
}

.header-divider {
    top: auto;
    right: auto;
    bottom: 0;
    left: 0;
}

.footer-divider {
    top: 0;
    right: 0;
    bottom: auto;
    left: auto;
}

.main-content {
    display: grid;
    flex: 1 1 0% !important;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: var(--gap-lg);
    align-items: stretch;
    width: 100%;
    max-width: var(--max-w);
    min-height: var(--middle-min) !important;
    margin-inline: auto;
    padding: 0 var(--page-pad) 64px;
    overflow: visible;
}

.main-content > * {
    min-height: 0;
}

.announcements-section {
    width: 100%;
    min-height: 0;
    padding: 6px 8px 8px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent;
}

.announcements-section > .announcements-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-right: 24px;
}

.announcements-section > .announcements-content.announcements-centered {
    justify-content: center;
}

.announcements-section > .announcements-content > :first-child {
    margin-top: 0;
}

.announcements-section > .announcements-content > :last-child {
    margin-bottom: 0;
}

.login-section {
    text-align: center;
    padding: 20px 0 0;
}

#container-login {
    width: 316px !important;
    height: unset !important;
    padding: 0 !important;
    text-align: unset !important;
}

#loginForm {
    padding: 0 !important;
}

.password {
    margin: 0 0 48px;
}

.footer-section {
    overflow: hidden;
    will-change: opacity, height;
    transition: opacity .35s ease, height .35s ease, padding .35s ease, margin .35s ease;
}

.copyright-text {
    position: absolute;
    margin-top: 12px;
    color: var(--sub);
    font-size: .85rem;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    letter-spacing: .02em;
}

.spinner-layout {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f4f4;
    z-index: 10000;
}

.windmill {
    position: relative;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #4285F4;
    color: #4285F4;
    transform-origin: 5px 15px;
    animation: windmill 2s infinite linear;
}

.windmill::before,
.windmill::after {
    content: "";
    display: inline-block;
    position: absolute;
}

.windmill::before {
    left: -8.66254px;
    top: 15px;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #64B5F6;
    color: #64B5F6;
}

.windmill::after {
    left: 8.66254px;
    top: 15px;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #1A73E8;
    color: #1A73E8;
}

.announcement-card {
    margin: 16px 0;
}

.announcement-card:first-child {
    margin-top: 0;
}

.announcement-date {
    margin: 0 0 4px;
    color: var(--sub);
    font-size: .9rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .04em;
}

.announcement-title {
    margin: 8px 0 8px;
    color: #1F2B3A;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

.announcement-body {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.55;
}

.announcement-body + .announcement-body {
    margin-top: 6px;
}

.announcement-body p {
    margin: 0 0 8px 0;
    line-height: 1.55;
}

.announcement-body p:last-child {
    margin-bottom: 0;
}

.portal-title {
    display: inline-block;
    color: #1F2B3A;
    font-size: 15px;
    font-weight: 700;
    padding-bottom: 24px;
}

.t-error,
.alert,
.alert-danger,
#loginForm > p {
    font-size: 0.8em;
}

#loginInputFrame {
    margin-top: 24px;
}

#loginInputFrame span {
    display: block;
    text-align: left;
    color: #1F2B3A;
    font-size: .9rem;
}

#login,
#password {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0 14px;
    border: 1px solid #4B5563;
    border-radius: 22px;
    background: #FFFFFF;
    color: #1F2B3A;
    font-size: .95rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

#login {
    margin: 5px 0 16px;
}

#submit_0 {
    appearance: none;
    cursor: pointer;
    width: unset !important;
    height: 28px;
    margin: 0 0 8px;
    padding: 0 16px;
    border: 0;
    border-radius: 20px;
    background: #2E5DAA;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

#submit_0:hover {
    background: #254C90;
}

.announcements-section::-webkit-scrollbar {
    width: 4px;
    height: 4px;
    background: transparent;
}

.announcements-section::-webkit-scrollbar-track {
    background: transparent;
    margin-block: 4px;
    border-radius: 999px;
}

.announcements-section::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--accent) 25%, #fff 0%) 0%,
            color-mix(in srgb, var(--accent) 40%, #000 0%) 100%);
    opacity: .3;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .05),
        0 0 1px rgba(0, 0, 0, .2);
    transition:
        opacity .2s ease,
        border-color .2s ease,
        background .2s ease,
        width .2s ease;
}

.announcements-section::-webkit-scrollbar-corner {
    background: transparent;
}

.announcements-section:hover {
    scrollbar-color: color-mix(in srgb, var(--accent) 50%, #fff 10%) rgba(255, 255, 255, .06);
}

.announcements-section:hover::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.announcements-section:hover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .06);
}

.announcements-section:hover::-webkit-scrollbar-thumb {
    opacity: .6;
    border-color: rgba(43, 44, 48, .4);
}

.announcements-section::-webkit-scrollbar-thumb:active {
    opacity: 1;
    border-color: rgba(43, 44, 48, 1);
}

#login:focus,
#password:focus,
#submit_0:focus {
    border-color: #2E5DAA;
    box-shadow: 0 0 0 3px rgba(46, 93, 170, 0.3);
}

#login:-webkit-autofill,
#password:-webkit-autofill,
#login:-webkit-autofill:hover,
#password:-webkit-autofill:hover,
#login:-webkit-autofill:focus,
#password:-webkit-autofill:focus,
#login:-webkit-autofill:active,
#password:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    -webkit-text-fill-color: #1F2B3A !important;
    background-color: #FFFFFF !important;
    background-clip: content-box !important;
}

span.password i.icon-eye {
    top: 2.4em !important;
    right: 8px !important;
}

@container (max-height: calc(var(--top-block) + var(--middle-min) + var(--bottom-block))) {
    .footer-section {
        opacity: 0;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none;
        visibility: hidden;
    }

    .footer-section .footer-divider {
        display: none;
    }
}

@supports not (container-type: size) {
    @media (max-height: 844px) {
        .footer-section {
            opacity: 0;
            height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            pointer-events: none;
            visibility: hidden;
        }

        .footer-section .footer-divider {
            display: none;
        }
    }
}

@media (max-width: 960px) {
    #container {
        display: block !important;
        height: auto !important;
        min-height: 100dvh;
        overflow: auto !important;
    }

    .main-content {
        display: flex !important;
        /* 順序を逆転（ログインが上） */
        flex-direction: column-reverse !important;
        flex: 0 0 auto !important;
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto;
        overflow: visible !important;
    }

    .announcements-section {
        overflow: visible !important;
        height: auto !important;
        max-height: 70dvh !important;
        overflow: auto !important;
    }

    .login-section {
        margin-top: var(--gap-lg);
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .portal-title {
        text-align: center;
    }

    #container-login {
        margin: 0 auto;
    }

    .footer-section {
        margin-top: var(--gap-lg);
    }
}

@media (min-width: 961px) {
    .main-content {
        align-items: center;
        justify-items: center;
    }

    .announcements-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        justify-self: stretch;
        max-height: 100%;
    }
}

@keyframes windmill {
    0% {
        transform: rotateZ(0deg) translate3d(0, 0, 0);
    }

    100% {
        transform: rotateZ(720deg) translate3d(0, 0, 0);
    }
}