/* 日本語テキストの適切な改行設定 */
h1, h2, h3, h4, h5, h6, p, span, a, li {
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* 全体的なオーバーフロー防止 */
* {
    box-sizing: border-box;
    max-width: 100%;
}

/* Privacy Policy Page Specific Styles */

/* Page Hero (reuse from other pages) */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.9;
    z-index: 1;
}

.page-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="80" height="80" viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.03"%3E%3Cpath d="M0 0h40v40H0V0zm40 40h40v40H40V40z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.page-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s 0.2s ease both;
}

/* Privacy Section */
.privacy-section {
    padding: 80px 0;
    background: var(--white);
    overflow-x: hidden;
}

.privacy-content {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
}

.privacy-intro {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    line-height: 1.8;
    font-size: 1.05rem;
    box-shadow: var(--shadow-sm);
}

/* Table of Contents */
.toc {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 4rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.toc h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.toc h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.toc ol {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
}

.toc li {
    counter-increment: toc-counter;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 2rem;
}

.toc li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 600;
}

.toc a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.toc a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Privacy Sections */
.privacy-sections {
    margin-top: 4rem;
}

.privacy-item {
    background: var(--white);
    padding: 3rem;
    margin-bottom: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    scroll-margin-top: 100px;
}

.privacy-item:hover {
    box-shadow: var(--shadow-md);
}

.privacy-item h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    flex-shrink: 0;
}

.privacy-item p {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.privacy-item ol {
    padding-left: 2rem;
    margin-top: 1rem;
}

.privacy-item ol li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
    color: var(--text-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Subsections */
.subsection {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.subsection h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.subsection h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.8rem;
}

.verification-docs {
    margin-top: 1rem;
}

.verification-docs p {
    margin-left: 1.5rem;
}

.verification-docs ol {
    margin-left: 1.5rem;
}

/* Company Details */
.company-details {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 1.5rem;
}

.company-details dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    margin: 0;
}

.company-details dt {
    font-weight: 600;
    color: var(--primary-color);
}

.company-details dd {
    margin: 0;
    color: var(--text-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Contact Details */
.contact-details {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    text-align: center;
}

.contact-details p {
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-details strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Enacted Date */
.enacted-date {
    text-align: right;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.enacted-date p {
    color: var(--text-light);
    font-style: italic;
}

/* Smooth Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .privacy-content {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .page-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .privacy-intro {
        padding: 2rem;
        font-size: 1rem;
    }
    
    .toc {
        padding: 2rem;
        overflow-x: auto;
    }
    
    .toc li {
        padding-left: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .privacy-item {
        padding: 2rem;
    }
    
    .privacy-item h2 {
        font-size: 1.5rem;
        flex-wrap: wrap;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        word-break: break-all;
        overflow-wrap: anywhere;
    }
    
    .privacy-item p {
        font-size: 0.95rem;
    }
    
    .privacy-item ol li {
        font-size: 0.95rem;
    }
    
    .section-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .company-details dl {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .company-details dt {
        margin-top: 1rem;
        font-size: 0.95rem;
    }
    
    .company-details dd {
        font-size: 0.95rem;
    }
    
    .company-details dt:first-child {
        margin-top: 0;
    }
    
    .contact-details p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .privacy-section {
        padding: 60px 0;
    }
    
    .privacy-content {
        padding: 0 0.5rem;
    }
    
    .privacy-intro {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .toc {
        padding: 1rem;
    }
    
    .toc h2 {
        font-size: 1.2rem;
    }
    
    .toc li {
        font-size: 0.9rem;
        padding-left: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .privacy-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .privacy-item h2 {
        font-size: 1.3rem;
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
        word-break: break-all;
        overflow-wrap: anywhere;
        line-height: 1.3;
    }
    
    .privacy-item p {
        font-size: 0.85rem;
        line-height: 1.8;
    }
    
    .privacy-item ol li {
        font-size: 0.85rem;
        line-height: 1.8;
    }
    
    .section-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .subsection {
        padding: 1rem;
    }
    
    .subsection h3 {
        font-size: 1.1rem;
    }
    
    .subsection h4 {
        font-size: 1rem;
    }
    
    .company-details {
        padding: 1rem;
    }
    
    .company-details dt {
        font-size: 0.85rem;
    }
    
    .company-details dd {
        font-size: 0.85rem;
    }
    
    .contact-details {
        padding: 1rem;
    }
    
    .contact-details p {
        font-size: 0.85rem;
    }
    
    .contact-details strong {
        font-size: 0.95rem;
    }
}

/* iPhone 12 Pro specific fixes */
@media (max-width: 390px) {
    /* Hide scroll progress bar on iPhone 12 Pro */
    .scroll-progress {
        display: none !important;
    }
    
    .privacy-section {
        padding: 60px 0;
    }
    
    .privacy-section .container {
        padding: 0 1rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .page-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .page-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .page-subtitle {
        font-size: 1rem;
        text-align: center;
        line-height: 1.4;
    }
    
    .privacy-item {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .privacy-item h2 {
        font-size: 1.3rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .privacy-item p {
        font-size: 0.95rem;
        line-height: 1.6;
        text-align: left;
    }
    
    .privacy-item ul {
        margin: 1rem 0;
        padding-left: 1.5rem;
    }
    
    .privacy-item li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }
    
    .section-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        margin: 0 auto 1rem;
    }
    
    .company-details {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .company-details dt {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .company-details dd {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .contact-details {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .contact-details p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .contact-details strong {
        font-size: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .privacy-item h2 {
        font-size: 1.1rem;
        line-height: 1.2;
    }
    
    .section-number {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
}