/* ========================================
   Legal pages: privacy-policy / terms-of-service
   ======================================== */

body.legal-page {
    background: #f8f9fb;
    color: #0b1020;
    font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    line-height: 1.8;
    margin: 0;
}

.legal-header {
    padding: 24px 24px 0;
}

.legal-header-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: #0b1020;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid rgba(231, 233, 242, 0.9);
    border-radius: 999px;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.legal-back:hover {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.4);
}

.legal-back svg {
    flex-shrink: 0;
}

.legal-main {
    max-width: 800px;
    margin: 24px auto 48px;
    padding: 0 24px;
}

.legal-content {
    background: #fff;
    border: 1px solid rgba(231, 233, 242, 0.9);
    border-radius: 20px;
    padding: 56px 56px 64px;
    box-shadow: 0 4px 28px rgba(11, 16, 32, 0.04);
}

.legal-content h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(231, 233, 242, 0.9);
    color: var(--text, #0b1020);
    letter-spacing: -0.02em;
}

.legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 48px 0 16px;
    padding-left: 16px;
    border-left: 4px solid #8b5cf6;
    color: var(--text, #0b1020);
    line-height: 1.5;
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 32px 0 12px;
    color: var(--text, #0b1020);
}

.legal-content p {
    margin: 0 0 16px;
    color: var(--text-muted, #444a5c);
    font-size: 0.95rem;
    line-height: 1.9;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
    color: var(--text-muted, #444a5c);
    font-size: 0.95rem;
    line-height: 1.9;
}

.legal-content li {
    margin-bottom: 8px;
}

.legal-content li > ul,
.legal-content li > ol {
    margin: 8px 0 8px;
}

.legal-content strong {
    color: var(--text, #0b1020);
    font-weight: 700;
}

.legal-content a {
    color: #6d28d9;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.legal-content a:hover {
    color: #8b5cf6;
}

.legal-content hr {
    border: 0;
    height: 1px;
    background: rgba(231, 233, 242, 0.9);
    margin: 40px 0;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 0.88rem;
    background: #fafbfc;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(231, 233, 242, 0.9);
}

.legal-content th,
.legal-content td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(231, 233, 242, 0.9);
    vertical-align: top;
    line-height: 1.7;
    color: var(--text-muted, #444a5c);
}

.legal-content th {
    background: rgba(139, 92, 246, 0.06);
    font-weight: 700;
    color: var(--text, #0b1020);
    font-size: 0.85rem;
}

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

.legal-footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted, #5f6679);
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    .legal-content {
        padding: 32px 24px 40px;
        border-radius: 14px;
    }
    .legal-content h1 {
        font-size: 1.5rem;
    }
    .legal-content h2 {
        font-size: 1.15rem;
    }
}
