/**
 * マカイクラウド - 法的ページ専用CSS
 * プライバシーポリシー・利用規約
 * Apple Privacy Policy 風フォーマルデザイン
 * common.css / front.css から完全独立
 */

/* ========== リセット・ベース ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: #1d1d1f;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #06c;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #004aad;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== コンテナ ========== */
.legal-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    min-height: 100vh;
}

/* ========== ヘッダー ========== */
.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #d2d2d7;
}

.legal-logo img {
    height: 28px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.legal-logo:hover img {
    opacity: 1;
}

.legal-nav {
    display: flex;
    gap: 0.125rem;
}

.legal-nav a {
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6e6e73;
    text-decoration: none;
    transition: all 0.2s ease;
}

.legal-nav a:hover {
    color: #1d1d1f;
    background: #f5f5f7;
    text-decoration: none;
}

.legal-nav a.active {
    color: #1d1d1f;
    background: #f5f5f7;
    font-weight: 600;
}

/* ========== コンテンツ ========== */
.legal-content {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.legal-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.01em;
}

.legal-content h1 i {
    color: #1d1d1f;
    font-size: 1.5rem;
    opacity: 0.7;
}

.legal-meta {
    font-size: 0.8125rem;
    color: #86868b;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #d2d2d7;
}

.legal-content section {
    margin-bottom: 2.5rem;
}

.legal-content section:last-child {
    margin-bottom: 0;
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e8e8ed;
    letter-spacing: -0.005em;
}

.legal-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #424245;
    margin-bottom: 0.875rem;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content ul,
.legal-content ol {
    margin: 0.5rem 0 1.25rem;
    padding-left: 1.5rem;
}

.legal-content li {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #424245;
    margin-bottom: 0.375rem;
}

.legal-content li strong {
    color: #1d1d1f;
    font-weight: 600;
}

.legal-content li ul {
    margin-top: 0.375rem;
    margin-bottom: 0.5rem;
}

/* ========== テーブル ========== */
.legal-table-wrap {
    overflow-x: auto;
    margin: 1.25rem 0;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.legal-table th {
    background: #f5f5f7;
    color: #1d1d1f;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #d2d2d7;
}

.legal-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8e8ed;
    color: #424245;
}

.legal-table tr:last-child td {
    border-bottom: none;
}

.legal-table tr:hover td {
    background: #fafafa;
}

/* ========== お問い合わせ ========== */
.legal-contact {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    margin-top: 1.25rem;
}

.legal-contact p {
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
    color: #424245;
}

.legal-contact p:last-child {
    margin-bottom: 0;
}

.legal-contact strong {
    font-size: 1rem;
    color: #1d1d1f;
}

/* ========== フッター ========== */
.front-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid #d2d2d7;
}

/* 法的ページではログイン/ユーザーリンク・テーマ切り替えを非表示 */
.footer-links,
.theme-switcher-expanded {
    display: none;
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.footer-legal a {
    color: #6e6e73;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: #1d1d1f;
    text-decoration: none;
}

.footer-legal-sep {
    color: #d2d2d7;
    font-size: 0.625rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: #86868b;
    letter-spacing: 0.01em;
}

.footer-copy p {
    margin: 0;
    line-height: 1.6;
}

/* ========== レスポンシブ ========== */
@media (max-width: 640px) {
    .legal-container {
        padding: 1.5rem 1rem 2.5rem;
    }

    .legal-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .legal-content h1 {
        font-size: 1.5rem;
    }

    .legal-content h2 {
        font-size: 1.0625rem;
    }

    .legal-nav a {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .legal-contact {
        padding: 1.25rem;
    }
}
