html, body {
    height: 100%;
    margin: 0;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;

}

#content-wrap {
    flex: 1 0 auto;
}

/* --- ここから固定フッター --- */
.ts-footer {
    background: #5f6369;
    color: #fff;
    text-align: center;
    padding: 20px 0 10px 0;
    font-size: 1rem;
    width: 100vw;
    box-shadow: 0 -2px 8px rgba(40,40,50,0.10);
    margin-top: auto;
}

.footer-content {
    --footer-left-offset: 1.3rem;
    margin: 0 auto;
    width: 100%;
    max-width: none;
    min-height: 72px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: min(980px, calc(100vw - 260px));
    margin: 0 auto;
}

.footer-link {
    color: #fff;
    text-decoration: underline;
    margin-right: 1.5em;
    font-size: 0.98em;
}

.footer-link:hover {
    color: #a1cbff;
    text-decoration: underline;
}

.footer-user {
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0.3em;
}

.footer-logout {
    color: #a1cbff;
    text-decoration: underline;
    margin-left: 0.5em;
}

.footer-logout:hover {
    color: #ff8ba7;
    text-decoration: underline;
}

.footer-home {
    display: block;
    color: #a1cbff;
    text-decoration: underline;
    margin: 0.2em auto 0 auto;
    font-size: 0.98em;
    width: fit-content;
}

.footer-home:hover {
    color: #ff8ba7;
    text-decoration: underline;
}

.f-log{
    height: 50px;
    width: 50px;
    flex: 0 0 auto;
    object-fit: contain;
}

.footer-log {
    position: absolute;
    left: var(--footer-left-offset);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.footer-log a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
}

.footer-login {
    margin: 0.2em 0 0.4em 0;
    font-size: 0.99em;
    width: 100%;
    text-align: center;
    overflow-wrap: anywhere;
}

.copylight{
    font-size: 12px;
    text-align: center;
    line-height: 25px;
    width: 100%;
    overflow-wrap: anywhere;
}

/* レスポンシブ（スマホ） */
@media (max-width: 900px) {
    .footer-content {
        min-height: auto;
        gap: 0.5em;
        padding: 0 12px;
    }
    .footer-center {
        order: 1;
        max-width: 100%;
        gap: 0.3em;
    }
    .footer-log {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        justify-content: center;
        padding: 0;
        order: 2;
    }
    .footer-log a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }
    .f-log {
        height: 36px;
        width: 36px;
    }
    .footer-login,
    .copylight {
        margin-bottom: 0.3em;
        width: 100%;
    }
    .footer-home { font-size: 0.93em; }
}
