/* Remove underline from footer copyright link */
.footer-copyright a,
.footer-copyright a:link,
.footer-copyright a:visited {
    color: inherit;
    text-decoration: none;
}

/* Underline on hover/focus */
.footer-copyright a:hover,
.footer-copyright a:focus {
    text-decoration: underline;
}

/* ================================
   Copyable exceptions
   - Header: allow copying logo text only
   - Footer: allow copying company name & type
   ================================ */

/* フッター：原則テキスト選択不可（フォーム除外） */
.site-footer *:not(input):not(textarea):not(select):not(option) {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* フッター：企業名＆会社種別はコピペ可 */
.site-footer .company-name,
.site-footer .company-type {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* Footer copyright positioned at right bottom */
/* [REMOVED] Footer v1 absolute positioning (replaced by grid in FOOTER v2 above) */

/* Social links in footer */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    justify-content: center;
}

/* social block */
.social-links {
    grid-area: social;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    justify-content: flex-start;
    margin-top: 0;
    /* FOOTER v2: legacy margin reset */
}

.social-follow {
    text-align: center;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--header-fg);
}

/* Ensure footer is positioned relatively for absolute child */
footer {
    position: relative;
}

/* === FOOTER v2: Responsive Grid Layout (desktop: 2 cols, mobile: stacked) === */
.site-footer .footer-inner {
    /* container */
    max-width: var(--content-max, 1080px);
    margin-inline: auto;
    padding: .9rem 1rem;

    /* grid */
    display: grid;
    grid-template-areas: "social copy";
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 2rem;
    row-gap: .6rem;

    /* soft divider */
    /* remove divider that looked like a frame */
    border-top: none;
}

html:not(.dark-mode) .site-footer .footer-inner {
    /* keep consistent in light mode as well */
    border-top: none;
}

.social-follow {
    margin-bottom: .25rem;
    line-height: 1.5;
}

.social-links a {
    padding: .2rem .15rem;
    line-height: 1.4;
}

/* copyright block */
.footer-copyright {
    grid-area: copy;
    position: static;
    /* reset legacy absolute */
    right: auto;
    /* reset legacy absolute */
    bottom: auto;
    /* reset legacy absolute */
    font-size: .9rem;
    justify-self: end;
}

/* mobile: stacked & centered */
@media (max-width: 700px) {
    .site-footer .footer-inner {
        grid-template-areas:
            "social"
            "copy";
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        row-gap: .7rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer-copyright {
        justify-self: center;
        margin-top: .2rem;
        font-size: .9rem;
    }
}

.social-links a {
    color: var(--header-fg);
    text-decoration: none;
}

