/* ===== 사이트 공통 푸터 (약관 링크 + 사업자 정보) =====
 * _Layout(콘솔 전 페이지)과 Login(Layout=null, site.css 미로드) 양쪽에서 로드된다.
 * → Login 에는 --bg-secondary / --text-secondary / --accent-blue 토큰이 없으므로 var() 폴백을 반드시 둔다.
 * 짧은 페이지에서도 푸터가 화면 바닥에 붙도록 body 를 세로 flex 로 만들고 main 이 남는 높이를 채운다. */

body.has-site-footer {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.has-site-footer > main {
    flex: 1 0 auto;
    width: 100%;
}

.site-footer {
    flex: 0 0 auto;
    margin-top: 36px;
    border-top: 1px solid var(--border-color, #2a2d38);
    background: var(--bg-secondary, transparent);
    color: var(--text-muted, #a1a5aa);
    font-family: inherit;
}

.site-footer-inner {
    width: min(1600px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0 28px;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    min-height: 28px;
    font-size: .78rem;
    font-weight: 500;
}

.site-footer-links a {
    color: var(--text-muted, #a1a5aa);
    text-decoration: none;
}

.site-footer-links a:hover {
    color: var(--accent-blue, #4a90d9);
}

/* 개인정보 처리방침은 다른 링크와 구분되게 표시(개인정보 보호법 시행령 제31조) */
.site-footer-links a.site-footer-privacy {
    font-weight: 700;
    color: var(--text-secondary, #c5c9ce);
}

.site-footer-divider {
    height: 1px;
    margin: 12px 0 18px;
    background: var(--border-color, #2a2d38);
}

.site-footer-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.site-footer-company {
    min-width: 0;
    color: var(--text-secondary, #c5c9ce);
    font-size: .78rem;
    line-height: 1.8;
}

.site-footer-company-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.site-footer-company-row > span {
    display: inline-flex;
    align-items: center;
    overflow-wrap: anywhere;
}

.site-footer-company-row > span:not(:last-child)::after {
    content: "·";
    margin: 0 10px;
    color: var(--text-muted, #a1a5aa);
}

.site-footer-company a {
    color: var(--text-secondary, #c5c9ce);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer-company a:hover {
    color: var(--accent-blue, #4a90d9);
}

.site-footer-copyright {
    flex: 0 0 auto;
    margin: 0;
    font-size: .78rem;
    line-height: 1.8;
    white-space: nowrap;
}

/* 로그인 화면: 배경 그라데이션 위에 얹히므로 배경색 없이 구분선만 */
body.login-page .site-footer {
    margin-top: 0;
    background: transparent;
}

@media (max-width: 760px) {
    .site-footer { margin-top: 24px; }

    .site-footer-inner {
        width: calc(100% - 32px);
        padding: 18px 0 22px;
    }

    .site-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .site-footer-company-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer-company-row > span:not(:last-child)::after { content: none; }

    .site-footer-copyright { white-space: normal; }
}
