/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #E91E63;
    --primary-dark: #C2185B;
    --secondary-color: #FF6B9D;
    --secondary-dark: #E91E63;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --bg-color: #FFFFFF;
    --bg-light: #F8F9FA;
    --border-color: #E0E0E0;
    --link-color: #E91E63;
    --link-hover: #C2185B;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --max-width: 900px;
    --spacing-unit: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.8;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: var(--spacing-unit);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    overflow: hidden;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 2);
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* 目次 */
.toc {
    background: var(--bg-light);
    padding: calc(var(--spacing-unit) * 2);
    border-bottom: 2px solid var(--border-color);
}

.toc h2 {
    font-size: 1.3rem;
    margin-bottom: calc(var(--spacing-unit) * 1);
    color: var(--text-primary);
}

.toc ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 1);
}

.toc li {
    flex: 1 1 auto;
}

.toc a {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5);
    background: white;
    color: var(--link-color);
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid var(--link-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.toc a:hover {
    background: var(--link-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* メインコンテンツ */
main {
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 2);
}

.document-section {
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.document-section > h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit) * 1);
    border-bottom: 3px solid var(--primary-color);
}

.intro {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 1.5);
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

article {
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 2);
    background: var(--bg-light);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

article:hover {
    box-shadow: var(--shadow);
}

article h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: calc(var(--spacing-unit) * 1);
    font-weight: 600;
}

article h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: calc(var(--spacing-unit) * 1.5);
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    font-weight: 600;
}

article p {
    margin-bottom: calc(var(--spacing-unit) * 1);
    line-height: 1.9;
}

article ul {
    margin-left: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 1);
    padding-left: calc(var(--spacing-unit) * 1.5);
}

article li {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    line-height: 1.8;
    position: relative;
}

article li::marker {
    color: var(--primary-color);
}

.contact-link {
    margin-top: calc(var(--spacing-unit) * 1);
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.contact-link a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
    word-break: break-all;
}

.contact-link a:hover {
    border-bottom-color: var(--link-color);
    color: var(--link-hover);
}

.agreement-notice,
.policy-notice {
    margin-top: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 2);
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(255, 107, 157, 0.1) 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
}

.agreement-notice p,
.policy-notice p {
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.agreement-notice strong,
.policy-notice strong {
    color: var(--primary-dark);
    font-size: 1.05rem;
}

/* フッター */
footer {
    background: var(--bg-light);
    padding: calc(var(--spacing-unit) * 2);
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    :root {
        --spacing-unit: 0.875rem;
    }

    body {
        padding: calc(var(--spacing-unit) * 0.5);
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .toc ul {
        flex-direction: column;
    }

    .toc a {
        width: 100%;
        text-align: center;
    }

    main {
        padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 1.5);
    }

    .document-section > h2 {
        font-size: 1.75rem;
    }

    article h3 {
        font-size: 1.3rem;
    }

    article {
        padding: calc(var(--spacing-unit) * 1.5);
    }

    .intro {
        font-size: 1rem;
        padding: calc(var(--spacing-unit) * 1);
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    .document-section > h2 {
        font-size: 1.5rem;
    }

    article h3 {
        font-size: 1.2rem;
    }

    article h4 {
        font-size: 1.1rem;
    }
}

/* スクロール時のスムーズな動作 */
html {
    scroll-behavior: smooth;
}

/* アクセシビリティ向上 */
a:focus,
button:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* 印刷スタイル */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    header {
        background: var(--primary-color);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .toc {
        display: none;
    }

    article {
        page-break-inside: avoid;
    }
}

