/* STUDY伴走の法務ページ共通レイアウト */
html {
    scroll-padding-top: 4rem;
}

body.geneki-page.legal-page {
    min-height: 100vh;
    background: #f8fafc;
    color: #0f172a;
    font-family: "Inter", "Noto Sans JP", sans-serif;
}

.legal-header-inner {
    width: min(100% - 3rem, 72rem);
    min-height: 4rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    color: #0f172a !important;
    text-decoration: none;
}

.legal-brand img {
    width: 2rem !important;
    height: 2rem !important;
    flex: 0 0 auto;
}

.legal-brand #header-logo-text {
    overflow: visible;
    text-overflow: clip;
}

.legal-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 2.2vw, 2rem);
    color: #475569;
    font-size: 0.875rem;
    font-weight: 700;
}

.legal-nav .nav-link,
.legal-mobile-nav .nav-link {
    color: #475569 !important;
    text-decoration: none;
    white-space: nowrap;
}

.legal-nav .nav-link:hover,
.legal-nav .nav-link:focus-visible,
.legal-mobile-nav .nav-link:hover,
.legal-mobile-nav .nav-link:focus-visible {
    color: #0f172a !important;
}

.legal-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    color: #fff !important;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.legal-header-cta:hover,
.legal-header-cta:focus-visible {
    background: linear-gradient(135deg, #22d3ee, #4f46e5);
}

.legal-menu-button {
    display: none;
    padding: 0.5rem;
    border: 0;
    background: transparent;
    color: #334155;
    cursor: pointer;
}

.legal-mobile-nav {
    display: none;
}

.legal-mobile-nav[hidden] {
    display: none;
}

.legal-main {
    width: min(100% - 3rem, 72rem);
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.legal-page-heading {
    margin-bottom: 2rem;
}

.legal-kicker {
    margin: 0 0 0.75rem;
    color: #0284c7;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.legal-page-heading h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.25;
}

.legal-page-heading > p:last-child {
    margin: 0.75rem 0 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
}

.legal-card {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    padding: clamp(1.5rem, 4vw, 3rem);
}

.legal-card section + section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.legal-card h2 {
    margin: 0 0 0.75rem;
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.5;
}

.legal-card p,
.legal-card li,
.legal-card dd {
    color: #334155;
    font-size: 1rem;
    line-height: 1.9;
}

.legal-card p {
    margin: 0;
}

.legal-card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.legal-contact {
    margin-top: 0.5rem !important;
    font-weight: 700;
}

.legal-date {
    margin-top: 2rem !important;
    color: #64748b !important;
    font-size: 0.875rem !important;
}

.legal-card-terms dl {
    margin: 0;
}

.legal-card-terms dl > div {
    display: grid;
    grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.legal-card-terms dl > div:first-child {
    padding-top: 0;
}

.legal-card-terms dl > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.legal-card-terms dt {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.7;
}

.legal-card-terms dd {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
}

.legal-footer {
    border-top: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
}

.legal-footer > div {
    width: min(100% - 3rem, 72rem);
    margin: 0 auto;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-footer p {
    margin: 0;
    font-size: 0.875rem;
}

.legal-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1rem 1.5rem;
}

.legal-footer a {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
    color: #0284c7;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #0f172a;
    color: #fff;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

@media (max-width: 900px) {
    .legal-nav {
        display: none;
    }

    .legal-menu-button {
        display: inline-flex;
    }

    .legal-mobile-nav {
        position: fixed;
        top: 4rem;
        left: 0;
        right: 0;
        z-index: 40;
        padding: 1rem 1.5rem 1.25rem;
        border-bottom: 1px solid rgba(14, 165, 233, 0.22);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    }

    .legal-mobile-nav:not([hidden]) {
        display: block;
    }

    .legal-mobile-nav nav {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
    }

    .legal-mobile-nav .legal-header-cta {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .legal-header-inner,
    .legal-main,
    .legal-footer > div {
        width: min(100% - 2rem, 72rem);
    }

    .legal-main {
        padding-top: 2rem;
    }

    .legal-card {
        border-radius: 1rem;
        padding: 1.25rem;
    }

    .legal-card-terms dl > div {
        display: block;
        padding: 1rem 0;
    }

    .legal-card-terms dt {
        margin-bottom: 0.35rem;
    }

    .legal-footer > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .legal-footer nav {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skip-link {
        transition: none;
    }
}
