body {
    margin: 0;
    padding: 0;
    font-family: 'BIZ UDPGothic', sans-serif;
    background-image: url('images/background.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

/* top-page-section の修正 */
.top-page-section {
    height: 300vh;
    position: relative;
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    /* height: auto から 100vh に変更 */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#top-image {
    width: 100%;
    height: 100vh;
    /* 画面いっぱいの高さに固定 */
    object-fit: cover;
    /* 画面幅に合わせて拡大 */
    object-position: center;
    /* 画像の下端を画面の下に合わせる（上が切れる） */
    display: block;
}

.top-title {
    font-family: 'Kaisei Opti', serif;
    font-size: 5vw;
    position: absolute;
    bottom: 40vh;
    z-index: 10;
    width: 85%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.top-text {
    color: #596f87;
}









/* クリップボード全体のコンテナ */
/* 外枠：スクロールできる全長 */
.clipboard-container {
    position: relative;
    width: 100vw;
    height: 300vh;
    /* スクロール遊び分 */
    margin-top: 30vh;
    margin-bottom: 0;
}

.content-area>.clipboard-container {
    background-image: url('images/030.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    margin-top: 0vh;
    padding-top: 100vh;
    padding-bottom: 100vh;
}

.content-area>.clipboard-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    /* 調整可 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 0ms linear 300ms;
    pointer-events: none;
    z-index: 0;
}

/* クリップボードが表示されたらうっすら白フィルターを乗せる */
.content-area>.clipboard-container.has-overlay::before {
    opacity: 1;
    visibility: visible;
    transition: opacity 300ms ease;
}

/* 紙画像を常に画面中央に表示、高さを画面に合わせ幅は自動にする */
.clipboard-sticky-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.clipboard-sticky-wrapper .paper-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100vh;
    /* 指示通り高さを画面いっぱいに */
    width: auto;
    /* 幅は自動 */
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
    /* 画像の上のテキスト操作を阻害しない */
}

/* テキストは紙の上に重なり、スクロールや選択を可能にする */
.clipboard-sticky-wrapper .inner-block {
    position: relative;
    top: 51%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: calc(83vh * 0.7);
    height: 80vh;
    overflow: visible;
    /* 長い文をスクロール可能に */
    padding: 6vh 2vw 4vh 2vw;
    pointer-events: auto;
    /* テキストやリンクを操作可能に */
    background: transparent;
    box-sizing: border-box;
    color: #2c4463;
}

/* 内部の段落余白は既存クラスで制御されるため重複しないように */
.clipboard-sticky-wrapper .inner-block p {
    margin-bottom: 1.2em
}





/* プロフィールページ全体の基本色とフォント設定 */
.inner-block {
    color: #2c4463;
    /* 少し青みがかった濃いグレー */
    line-height: 1.6;
    font-family: 'Kaisei Opti', serif;
}

/* タイトル設定 */
.main-title {
    text-align: center;
    font-size: 5.0vh;
    letter-spacing: 0.05em;
    margin: 0;
}

.profile-section {
    position: relative;
    /* イラストを自由に配置するための基準 */
    width: 100%;
    height: 45%;
    margin-bottom: 5%;
}

.profile-grid {
    display: grid;
    grid-template-columns: 40% 1fr;
    align-items: start;
    margin-top: 3%;
}

.profile-image {
    grid-column: 1;
    justify-self: center;
    align-self: center;
}

.profile-image img {
    width: auto;
    height: 23vh;
}

.profile-info p {
    font-size: 1.9vh;
    line-height: 0.7vh;
    font-weight: bold;
}

/* 紹介文：イラストと重ならないように左側に余白を作る */
.profile-info {
    margin-top: 2.0vh;
}

/* --- 下段：About部分のレイアウト --- */

.about-section {
    position: relative;
    width: 100%;
    height: 50%;
    margin-top: 3vh;
    /* プロフィールとの間隔 */
}

.about-grid {
    display: grid;
    grid-template-columns: 60% 1fr;
    align-items: start;
    margin-top: 3%;
    margin-left: 1vh;
}

/* 左側：説明文（Category, Concept, Detail） */
.about-info dl {
    display: grid;
    /* 項目名(Category:)と中身を 2列に並べる */
    grid-template-columns: auto 1fr;
    gap: 1vh;
    /* 縦と横の隙間 */
    margin-top: 5%;
}

.about-info dt {
    font-size: 2.0vh;
    font-weight: bold;
    color: #2c4463;
    white-space: nowrap;
    /* 改行させない */
}

.about-info dd {
    font-size: 1.8vh;
    font-weight: bold;
    margin-left: 0%;
    line-height: 1.3;
}

/* 右側：ラテ画像とキャプション */
.item-image {
    text-align: center;
}

.item-image img {
    width: auto;
    height: 23vh;
    display: block;
}

.item-image .caption {
    font-size: 1.8vh;
    margin-top: 0px;
    line-height: 1.2;
    color: #2c4463;
}

.item-image .caption span {
    font-size: 1.1vw;
    display: block;
    font-family: 'Kaisei Opti', serif;
    margin-top: 1px;
}



/* --- プロローグページ（2枚目）のスタイル --- */

.prologue-page {
    text-align: center;
    color: #2c4463;
    font-family: 'Kaisei Opti', serif;
    /* 中央表示に合わせてマージン調整（負のマージンを削除） */
    margin-top: 0;
    box-sizing: border-box;
}

.prologue-text {
    font-size: 1.6vh;
    /* 少し小さめで繊細な印象に */
    line-height: 1.8;
    /* 行間を広く取って読みやすく */
    margin-bottom: 1vh;
    margin-top: 2vh;
    text-align: center;
}

.prologue-text p {
    margin-bottom: 1.3em;
    /* 段落ごとの隙間 */
}

.highlight-text {
    font-weight: bold;
    font-weight: 900;
    font-size: 2.0vh;
    display: inline-block;
    line-height: 1.2;
    margin: 15px 0;
}

.question-text {
    font-size: 2.5vh;
    margin-top: 0;
    letter-spacing: 0.05em;
    font-weight: bold;
}

/* オーバーレイが非表示になったら完全に操作不可にする */
.first-page[aria-hidden="true"] {
    pointer-events: none;
    visibility: hidden;
    opacity: 0 !important;
}


/* オーバーレイ（初期の profile/about） */
.first-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4;
    pointer-events: auto;
    transition: opacity 1.0s ease-out;
    /* ここも短くしてより素早くフェード */
    will-change: opacity;
}

/* 表示時は完全に中央で浮かび上がる */
.inner-block.revealed {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
    pointer-events: auto;
}


/* 以下は prologue を確実に前面に出し、overlay を完全に退かせる上書きルール */
.first-page[aria-hidden="true"] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* overlay の通常表示時は紙より下に抑える（必要なら数値を調整） */
.first-page {
    z-index: 40;
}

/* #second-page を前面に出す（HTML は id を使用） */
.clipboard-sticky-wrapper #second-page {
    z-index: 200;
    pointer-events: auto;
}

/* Prologue（本文）を最前面にし、中央かつスクロール可能にする */
.prologue-section {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(10px);
    opacity: 0;
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
    z-index: 300;
    /* 最前面 */
    pointer-events: none;
    width: min(780px, 64vw);
    max-height: 86vh;
    overflow-y: auto;
    /* 長い本文を内部でスクロール */
    padding: 4vh 3vw;
    border-radius: 6px;
    box-sizing: border-box;
}

.inner-block.revealed .prologue-section {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
    pointer-events: auto;
}

/* 細かい調整：画像が pointer を遮らないように */
.clipboard-sticky-wrapper .paper-image {
    pointer-events: none;
}

/* --- styles.css の該当箇所を書き換え --- */

/* 1枚目：最初は見える状態にするが、JSで変更できるように opacity: 1 は消すか、JSに従うようにする */
#first-page {
    z-index: 11;
    /* opacity: 1; ← これを削除。指定しないことでJSが操作しやすくなります */
}

/* 2枚目：最初は絶対に見えないようにしておく */
#second-page {
    z-index: 12;
    opacity: 0;
    visibility: hidden;
    /* 完全に隠す */
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s;
    /* ふわっと出すためのアニメーション設定 */
}

#third-page {
    z-index: 12;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s;
}

/* JSで操作する共通コンテナの基本設定 */
.paper-content-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    /* transition: opacity 0.3s ease; をここに入れてもOK */
    transition: opacity 0.4s ease;
}






/* 転機セクション全体（スクロールの長さ） */
.turning-point-section {
    height: 400vh;
    position: relative;
    background: transparent;
}

/* 画面に固定するコンテナ */
.turning-point-sticky {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* 画像コンテナ */
.tree-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

#turning-tree-full {
    width: 100%;
    height: 100%;
    /* --- ここが重要 --- */
    object-fit: cover;
    /* 画面幅に合わせて拡大 */
    object-position: bottom;
    /* 常に画像の下部を画面の下端に合わせる（上が切れる設定） */
    display: block;
}

/* 文字の位置調整 */
.turning-message-overlay {
    position: absolute;
    /* 画像の上に自由に配置 */
    top: 45%;
    /* 画面中央付近 */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: #2c4463;
    font-family: 'Kaisei Opti', serif;
    font-size: 1.8vh;
    line-height: 2.2;
    width: 90%;
}

.turning-highlight {
    margin-top: 30px;
    font-weight: bold;
    font-size: 2.5vh;
}










/* セクション全体 */
.menu-board-section {
    width: 100vw;
    height: 100vh;
    margin-top: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-family: 'Kaisei Opti', serif
}

.menu-full-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.board-full-img {
    width: auto;
    height: 100vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ボード上の全要素を包むレイヤー */
.menu-content-overlay {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* ボードの盤面に合わせる */
    width: calc(65vh * 1.5);
    height: 65vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* [Menu] タイトル */
.menu-top-title {
    font-size: 5vh;
    color: #2c4463;
    margin-bottom: 0;
    letter-spacing: 0.05em;
}

/* アイテムを横に並べるエリア */
.menu-items-layer {
    width: 100%;
    height: 45vh;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    /* ドリンクの底を基準にする */
    transform: translateY(-2vh);
}

/* 個別リンク */
.menu-item-link {
    text-decoration: none;
    width: 30%;
    height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

/* --- 段差（高さの調整） --- */
.step-up {
    margin-bottom: 5vh;
    /* 1章と3章を浮かせる */
}

.step-mid {
    margin-bottom: 0vh;
    /* 2章はそのまま */
}

/* ドリンクのサイズ：以前より大きく */
.menu-icon-wrapper {
    height: 75%;
    width: auto;
    margin-bottom: 1vh;
}

.menu-drink-icon {
    width: auto;
    height: 100%;
}

/* テキスト：ドリンクの上 */
.chapter-label-group {
    text-align: center;
    margin-bottom: 1vh;
}

.chapter-num {
    font-size: 2.3vh;
    font-weight: bold;
    color: #2c4463;
    margin: 0;
}

.chapter-title {
    font-size: 2.6vh;
    margin: 0;
    font-weight: bold;
    color: #2c4463;
    white-space: nowrap;
}

/* テキスト：ドリンクの下（セリフ） */
.chapter-quote {
    font-size: 2vh;
    line-height: 1.4;
    color: #5a6f87;
    margin: 0;
    text-align: center;
    min-height: 3em;
    /* セリフの長さが変わっても高さが崩れないように */
}

/* ホバー演出 */
.menu-item-link:hover {
    transform: scale(1.08);
}










/* --- Chapter1 メインビジュアル（最新レイアウト） --- */

/* 1. ページ読み込み時の白いフェード */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    pointer-events: none;
    animation: fadeOutLoader 2.0s ease-in-out forwards;
}

@keyframes fadeOutLoader {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.chapter-top-visual {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.visual-container {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    /* height: auto から 100vh に変更 */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 画像は鮮明に、かつアニメーションで表示 */
.main-visual-img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: bottom;
    display: block;
}

@keyframes simpleFadeIn {
    to {
        opacity: 1;
    }
}

/* タイトルの左右分割レイアウト */
.title-split-container {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    /* 左右の端に寄せる */
    padding: 0 10% 0 5%;
    /* 中央の人物を避けるための左右余白（適宜調整） */
    box-sizing: border-box;
    z-index: 10;
    pointer-events: none;
}

.title-left,
.title-right {
    font-family: 'Kaisei Opti', serif;
    font-size: 8vh;
    color: #2c4463;
    margin: 0;
    opacity: 0;
    animation: titlePop 1.5s ease-out 1.2s forwards;
}

@keyframes titlePop {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 右下の第1章 */
.chapter-number-badge {
    position: absolute;
    right: 10%;
    bottom: 5%;
    font-family: 'Kaisei Opti', serif;
    font-size: 5vh;
    font-weight: bold;
    color: #2c4463;
    opacity: 0;
    animation: simpleFadeIn 1.0s ease-out 1.8s forwards;
    z-index: 10;
}












.chapter-1 .clipboard-container,
.chapter-2 .clipboard-container,
.chapter-3 .clipboard-container {
    position: relative;
    width: 100vw;
    height: 500vh;
    /* スクロール遊び分 */
    margin-top: 30vh;
}

.interview-section {
    position: relative;
    width: 90%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -51%);
    overflow-y: auto;
}

.interview-section .question {
    position: relative;
    font-size: 2.1vh;
    letter-spacing: 0.04em;
    padding-left: 1.5vw;
    padding-right: 1vw;
    margin: 0 0 4vh 0;
    font-weight: bold;
    line-height: 2.7vh;
}

/* 左の縦長バー */
.interview-section .question::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3vh;
    bottom: 0.3vh;
    width: 1vh;
    background: #2c4463;
    /* 好きな色に変更可 */
    border-radius: 2px;
}

/* 下の細いライン */
.interview-section .question::after {
    content: "";
    position: absolute;
    left: 0;
    right: 1vh;
    bottom: -1vh;
    /* ラインと次の要素の距離 */
    height: 1px;
    background: #2c4463;
    /* 薄いライン */
    opacity: 0.3;
}

.answer {
    margin-top: 2.0vh;
    font-size: 1.9vh;
    line-height: 3.0vh;
}

.response {
    font-size: 1.7vh;
    margin: 3vh 0;
    color: #777;
}

.interview-section .inner-block {
    overflow-y: hidden !important;
    /* 標準のスクロールバーを消し、JSに任せる */
}

.page-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0.5vh;
}




/* メニューに戻るボタン（共通設定） */
.back-menu {
    position: fixed;
    bottom: 5vh;
    /* 下からの距離 */
    left: 5vw;
    /* 左からの距離 */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    z-index: 1000;
    /* 最前面に表示 */
    transition: transform 0.3s ease;
}

/* 卓上ベルの画像 */
.back-menu img {
    width: 15vw;
    /* ベルのサイズ（適宜調整してください） */
    height: auto;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    /* 軽く影をつけて見やすく */
    transition: filter 0.3s ease;
}

/* 「メニューに戻る」の文字 */
.back-menu span {
    font-family: 'Kaisei Opti', serif;
    font-size: 2vh;
    font-weight: bold;
    color: #2c4463;
    /* 他のテキストと合わせた色 */
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.7);
    /* 文字の背景を少し明るくして可読性アップ */
    padding: 2px 8px;
    border-radius: 4px;

}

/* ホバー時の演出（チリンと鳴るようなイメージ） */
.back-menu:hover {
    transform: scale(1.1);
    /* 少し大きく */
}

.back-menu:hover img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) brightness(1.1);
}





/* サマリーとボタンのレイアウト */
.summary-container {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 0 10%;
}

.summary {
    font-size: 2vh;
    line-height: 1.8;
    color: #2c4463;
    margin-bottom: 4vh;
}

/* 次の章へのボタン */
.next-chapter-btn {
    display: inline-block;
    padding: 1.5vh 3vh;
    background-color: #2c4463;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.8vh;
    font-weight: bold;
    border-radius: 50px;
    /* 丸みのあるデザイン */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 68, 99, 0.2);
}

.next-chapter-btn:hover {
    background-color: #3e5d85;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(44, 68, 99, 0.3);
}

.next-chapter-btn .arrow {
    margin-left: 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.next-chapter-btn:hover .arrow {
    transform: translateX(5px);
    /* ホバーで矢印が動く */
}

/* GIFのサイズ調整 */
.summary-gif {
    position: absolute;
    width: 100%;
    margin-bottom: 20vh;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.summary-gif img {
    width: 100%;
    /* 紙の幅に対してのサイズ（お好みで調整してください） */
    height: auto;
    object-fit: contain;
}

.summary {
    font-size: 2vh;
    line-height: 1.8;
    color: #2c4463;
    margin-bottom: 3vh;
}






