/* =====================================================
   Shared front-site footer
   All public pages load this file last so page-specific
   legacy footer rules cannot change the common layout.
===================================================== */
.site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    border-top: 1px solid #ded9d1;
    background: rgba(255, 255, 255, .98);
    color: #68625b;
    font-family:
        "Noto Serif TC",
        "Songti TC",
        "PMingLiU",
        "PingFang TC",
        "Microsoft JhengHei",
        serif;
}

.site-footer .footer-inner {
    width: min(1180px, calc(100% - 48px));
    min-height: 76px;
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    font-size: 12px;
    line-height: 1.7;
}

.site-footer .footer-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin: 0;
    padding: 0;
}

.site-footer .footer-nav a {
    color: #514b45;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease;
}

.site-footer .footer-nav a:hover {
    color: #9a493a;
}

.site-footer .copyright {
    flex: 0 0 auto;
    margin: 0;
    color: #807970;
    text-align: right;
    white-space: nowrap;
}

/* Reader uses a special full-width layout; footer still stays in normal flow. */
.reader-page .site-footer,
body:has(.reader-shell) > .site-footer {
    z-index: 4;
}

@media (max-width: 760px) {
    .site-footer .footer-inner {
        width: min(100% - 36px, 1180px);
        min-height: 0;
        padding: 22px 0 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .site-footer .footer-nav {
        gap: 8px 20px;
    }

    .site-footer .copyright {
        text-align: left;
        white-space: normal;
    }
}
