* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f6f6f6;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #202122;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.wiki-container {
    max-width: 95%;
    width: 100%;
    margin: 0 auto;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.page-header {
    border-bottom: 2px solid #a2a9b1;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.page-header h1 {
    font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 400;
    color: #000;
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
    line-height: 1.2;
    word-break: break-word;
}

.subheader {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    font-size: 0.9rem;
    color: #54595d;
    margin-top: 0.25rem;
}

.subheader span {
    border-right: 1px solid #c8ccd1;
    padding-right: 1rem;
}
.subheader span:last-child {
    border-right: none;
}

.notice {
    background: #f8f9fa;
    border: 1px solid #c8ccd1;
    padding: 0.75rem 1rem;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.8rem;
    border-radius: 2px;
}

.notice strong {
    font-weight: 600;
    margin-right: 0.3rem;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background: #d3d9e4;
    padding: 2px 2px 0 2px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0.2rem;
}

.tab-item {
    background: #e8ecf3;
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    border-radius: 3px 3px 0 0;
    color: #0645ad;
    text-decoration: none;
    border-bottom: 1px solid #a7b1c1;
    white-space: nowrap;
    cursor: pointer;
}

.tab-item.active {
    background: white;
    border-bottom: 1px solid white;
    font-weight: 500;
    color: #000;
}

.toc {
    float: left;
    background: #f8f9fa;
    border: 1px solid #c8ccd1;
    padding: 1rem 1.2rem;
    margin: 0 1.8rem 1rem 0;
    width: 260px;
    border-radius: 3px;
}

.toc h2 {
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid #c8ccd1;
    padding-bottom: 0.3rem;
    margin-bottom: 0.6rem;
    font-family: inherit;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.toc li a {
    color: #0645ad;
    text-decoration: none;
    word-break: break-word;
}

.toc li a:hover {
    text-decoration: underline;
}

.toc .toc-level-2 {
    margin-left: 1.2rem;
}

h2 {
    font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
    font-size: clamp(1.5rem, 5vw, 1.9rem);
    font-weight: 400;
    border-bottom: 1px solid #c8ccd1;
    margin: 1.8rem 0 1rem 0;
    padding-bottom: 0.2rem;
    clear: both;
}

h3 {
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
}

.infobox {
    float: right;
    clear: right;
    background: #f8f9fa;
    border: 1px solid #c8ccd1;
    width: min(300px, 100%);
    margin: 0 0 1rem 1.5rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    border-collapse: collapse;
}

.infobox th {
    background: #e5e9f0;
    text-align: center;
    font-weight: 600;
    padding: 0.5rem;
    border: 1px solid #ced2da;
}

.infobox td {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ced2da;
    vertical-align: top;
}

.infobox .label {
    font-weight: 600;
    width: 35%;
}

.article-content {
    text-align: justify;
}

.article-content p {
    margin: 0.6rem 0 1rem 0;
}

.reference {
    font-size: 0.75rem;
    vertical-align: super;
    line-height: 0;
    color: #0645ad;
}

blockquote {
    border-left: 4px solid #c8ccd1;
    padding: 0.5rem 0 0.5rem 1.2rem;
    margin: 1rem 0 1rem 0.5rem;
    color: #2c3e50;
    background: #fafbfc;
    font-size: 0.95rem;
}

.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 1.8rem 0;
}

.person-card {
    border: 1px solid #d9dce3;
    background: #fbfcfe;
    padding: 0.8rem 1rem 0.5rem 1rem;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    height: fit-content;
}

.person-card h4 {
    font-size: 1.4rem;
    font-weight: 500;
    border-bottom: 1px dotted #b3b9c4;
    padding-bottom: 0.2rem;
    margin-bottom: 0.5rem;
    color: #0b2d4b;
    word-break: break-word;
}

.person-card .lifespan {
    font-family: monospace;
    background: #eef1f5;
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    color: #333;
    word-break: break-word;
}

.person-card p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.theories-badge {
    background: #e9ecf2;
    padding: 0.4rem;
    font-size: 0.9rem;
    border-left: 3px solid #6688aa;
    margin-top: 0.5rem;
    word-break: break-word;
}

.theories-badge strong {
    color: #1a385c;
}

.theory-list {
    list-style: none;
    margin: 1.2rem 0;
}

.theory-list li {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid #e1e5eb;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: flex-start;
}

.theory-list li::before {
    content: "▹";
    color: #476b91;
    font-weight: bold;
    font-size: 1.1rem;
}

.theory-list strong {
    font-weight: 600;
    min-width: 140px;
    color: #1e3a5f;
}

.theory-list span {
    flex: 1;
    min-width: 200px;
    font-size: 0.95rem;
}

.footer-note {
    border-top: 1px solid #a2a9b1;
    margin-top: 2.5rem;
    padding-top: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
}

@media screen and (max-width: 720px) {
    .wiki-container {
        padding: 1rem 1.2rem;
    }

    .toc {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem 0;
    }

    .infobox {
        float: none;
        width: 100%;
        margin: 1.5rem 0;
    }

    .subheader span {
        border-right: none;
        border-bottom: 1px dotted #c8ccd1;
        padding-bottom: 0.3rem;
        width: 100%;
    }

    .notice {
        flex-direction: column;
        gap: 0.3rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-item {
        white-space: normal;
        flex: 1 1 auto;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .wiki-container {
        padding: 0.8rem 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .theory-list li {
        flex-direction: column;
        gap: 0.3rem;
    }

    .theory-list li::before {
        display: none;
    }

    .theory-list strong {
        min-width: auto;
        width: 100%;
        background: #eef2f7;
        padding: 0.2rem 0.5rem;
    }

    .person-grid {
        grid-template-columns: 1fr;
    }

    blockquote {
        margin-left: 0;
        padding-left: 1rem;
    }
}

@media screen and (min-width: 1400px) {
    .wiki-container {
        max-width: 95%;
        font-size: 1.05rem;
    }
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}
