/* ==========================================
   大陸記 ── フォルカの章
   イーノ・タランタッカ
   羊皮紙・中世古書テーマ
   ========================================== */

/* リセット・基礎 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #3a2a1a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    font-family: 'Noto Serif JP', 'Georgia', serif;
}

/* 羊皮紙本体 */
.manuscript {
    max-width: 780px;
    width: 100%;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(160,130,90,0.04) 28px, rgba(160,130,90,0.04) 29px),
        radial-gradient(ellipse at 20% 50%, rgba(180,150,100,0.1) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 20%, rgba(160,140,100,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 90%, rgba(170,145,95,0.06) 0%, transparent 50%),
        linear-gradient(to bottom, #f5e6c8 0%, #e8d5a8 30%, #f5e6c8 60%, #e8d5a8 100%);
    background-color: #f5e6c8;
    box-shadow:
        inset 0 0 100px rgba(160,130,90,0.3),
        0 0 60px rgba(0,0,0,0.5),
        0 4px 30px rgba(0,0,0,0.3);
    padding: 60px 55px;
    position: relative;
    border: 1px solid #c4a86c;
}

/* 羊皮紙の端の染み */
.manuscript::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 5% 10%, rgba(140,110,70,0.15) 0%, transparent 30%),
        radial-gradient(circle at 95% 85%, rgba(130,100,60,0.12) 0%, transparent 25%),
        radial-gradient(circle at 50% 5%, rgba(150,120,80,0.08) 0%, transparent 20%);
    pointer-events: none;
}

/* ==========================================
   巻頭ヘッダー
   ========================================== */
.manuscript-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 2px solid #8a7656;
}

.header-ornament {
    margin-bottom: 30px;
}

.ornament-img {
    max-width: 400px;
    width: 80%;
    height: auto;
    opacity: 0.7;
    filter: sepia(30%) contrast(1.1);
}

.title-main {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #3a2a1a;
    letter-spacing: 0.3em;
    margin-bottom: 8px;
}

.title-sub {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #7a6652;
    letter-spacing: 0.4em;
    margin-bottom: 20px;
}

.title-divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(to right, transparent, #8b3a2a, transparent);
    margin: 20px auto;
}

.title-chapter {
    font-family: 'Noto Serif JP', serif;
    font-size: 1rem;
    color: #5a4632;
    margin-bottom: 12px;
    letter-spacing: 0.2em;
}

.title-section {
    font-family: 'Noto Serif JP', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #3a2a1a;
    margin-bottom: 6px;
    letter-spacing: 0.15em;
}

.title-section-latin {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #8b3a2a;
    letter-spacing: 0.3em;
    margin-bottom: 30px;
    font-style: italic;
}

.author-block {
    margin-top: 25px;
}

.author-name {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #3a2a1a;
    letter-spacing: 0.15em;
}

.author-desc {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    color: #7a6652;
    margin-top: 6px;
    font-style: italic;
}

/* ==========================================
   エピグラフ（引用）
   ========================================== */
.epigraph {
    border-left: 3px solid #b8963a;
    margin: 35px 25px;
    padding: 20px 25px;
    background: rgba(184,150,58,0.05);
    position: relative;
}

.epigraph::before {
    content: '"';
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    color: #b8963a;
    position: absolute;
    top: -5px;
    left: 8px;
    opacity: 0.4;
    line-height: 1;
}

.epigraph p {
    font-family: 'Shippori Mincho', serif;
    font-size: 1rem;
    line-height: 2;
    color: #4a3a2a;
    font-style: italic;
    text-indent: 0;
}

.epigraph-source {
    text-align: right;
    font-size: 0.85rem !important;
    color: #7a6652 !important;
    margin-top: 10px;
    font-style: normal !important;
}

.epigraph--closing {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
    border-left: none;
    border-top: 1px solid #b8963a;
    border-bottom: 1px solid #b8963a;
    padding: 25px;
}

.epigraph--closing p {
    text-align: center;
}

/* ==========================================
   章
   ========================================== */
.chapter {
    margin-bottom: 50px;
}

.chapter-heading {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #3a2a1a;
    letter-spacing: 0.15em;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #c4a86c;
    position: relative;
}

.chapter-heading::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #8b3a2a;
}

/* 本文 */
.chapter p {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.02rem;
    line-height: 2;
    color: #3a2a1a;
    text-indent: 1em;
    margin-bottom: 1.2em;
    text-align: justify;
}

/* ==========================================
   挿絵
   ========================================== */
.illustration {
    margin: 35px 0;
    text-align: center;
}

.illustration img {
    max-width: 100%;
    height: auto;
    border: 1px solid #c4a86c;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    filter: sepia(15%) contrast(1.05) brightness(0.98);
}

.illustration figcaption {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    color: #7a6652;
    margin-top: 10px;
    font-style: italic;
    letter-spacing: 0.05em;
}

.illustration--map img {
    max-width: 90%;
}

/* ==========================================
   傍注
   ========================================== */
.sidebar-note {
    background: rgba(138,118,86,0.08);
    border: 1px solid #c4a86c;
    border-left: 3px solid #8b3a2a;
    padding: 18px 22px;
    margin: 30px 15px;
    position: relative;
}

.note-label {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8b3a2a;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-indent: 0 !important;
}

.sidebar-note p {
    font-size: 0.92rem !important;
    line-height: 1.9 !important;
    color: #4a3a2a !important;
}

/* ==========================================
   奥付
   ========================================== */
.colophon {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #8a7656;
    text-align: center;
}

.colophon-ornament {
    margin-bottom: 25px;
}

.colophon-content {
    padding: 0 20px;
}

.colophon-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #3a2a1a;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.colophon-author {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.95rem;
    color: #5a4632;
    margin-bottom: 15px;
}

.colophon-note {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.82rem;
    color: #7a6652;
    line-height: 1.8;
    margin-bottom: 4px;
}

/* ==========================================
   但し書き
   ========================================== */
.disclaimer {
    margin-top: 40px;
    padding: 20px 25px;
    background: rgba(0,0,0,0.03);
    border: 1px dashed #a89878;
    border-radius: 4px;
}

.disclaimer p {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.82rem;
    color: #7a6652;
    line-height: 1.8;
    text-indent: 0;
    text-align: center;
    margin-bottom: 8px;
}

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

.disclaimer-highlight {
    color: #5a4632 !important;
    font-size: 0.85rem !important;
}

ruby {
    ruby-position: over;
}

rt {
    font-size: 0.6em;
    color: #7a6652;
}

/* ==========================================
   レスポンシブ
   ========================================== */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .manuscript {
        padding: 35px 25px;
    }

    .title-main {
        font-size: 2rem;
    }

    .title-section {
        font-size: 1.5rem;
    }

    .chapter-heading {
        font-size: 1.3rem;
    }

    .chapter p {
        font-size: 0.95rem;
    }

    .epigraph {
        margin: 25px 10px;
        padding: 15px 18px;
    }

    .sidebar-note {
        margin: 20px 5px;
        padding: 15px 18px;
    }

    .ornament-img {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .manuscript {
        padding: 25px 18px;
    }

    .title-main {
        font-size: 1.7rem;
        letter-spacing: 0.15em;
    }

    .title-sub {
        font-size: 0.85rem;
    }

    .title-section {
        font-size: 1.3rem;
    }

    .chapter p {
        font-size: 0.9rem;
        line-height: 1.9;
    }

    .ornament-img {
        max-width: 250px;
    }
}
