@charset "UTF-8";
@import url('https://fonts.googleapis.com/css?family=Noto+Sans+JP');
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&display=swap');

/* ==========================================
   1. ベース設定・全体レイアウト
========================================== */

/* 全体背景 */
main#beethoven-sp-top {
    /* 部屋画像に黒透過2D2828 80%を重ねた背景 */
    background: linear-gradient(rgba(45, 40, 40, 0.8), rgba(45, 40, 40, 0.8)), url('../img/fig6_room_dark.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ECE8EB; 
    font-family: 'Noto Sans JP', sans-serif;
    padding-bottom: 3em;
}

#content_wrapper {
    max-width: 1000px;
    width: 100%;
    margin: auto;
    padding: 0;
    box-sizing: border-box;
}

/* メインビジュアル（PC幅） */
.main-visual-wrapper {
    width: 100%;
    padding-top: 2em; 
    margin: 0 auto 2em;
}
.main-visual-img {
    width: 100%;
    height: auto;
    display: block;
}

/* トップリード文 */
.lead_st {
    line-height: 1.9;
}
.lead_st + .lead_st {
    margin-top: 1.9em; /* 段落と段落の間を1行空ける */
}

/* スマホ専用背景レイヤーはPCでは非表示 */
.sp-bg-clip {
    display: none;
}

/* ==========================================
   2. 共通ユーティリティ（余白・文字位置・カラーなど）
========================================== */
.text-white { color: #ECE8EB; }
.text-gold { color: #D7B572; }
.text_center { text-align: center; }
.text_left { text-align: left; }
.margin_top1em { margin-top: 1em; }
.margin_top2em { margin-top: 2em; }
.width100 { width: 100%; }


/* ==========================================
   3. 見出しスタイル（セクションタイトル）
========================================== */

/* 見出し（上下線付き） */
.section-title, .section-title-white {
    text-align: center;
    margin: 3em auto 2em;
    width: 100%; /* 幅を100%に広げて、中の.title-en(80%)を効かせる */
}

/* 見出しの英語部分（全体の幅をコンテナの80%に固定） */
.title-en {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.2em;
    color: #D7B572;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%; /* トップバナー幅を100とした場合の80% */
    margin: 0 auto 1em; /* 中央寄せしつつ下の隙間を確保 */
}

/* 両脇の線を長く（flex-growで余白を自動的に均等に埋める） */
.title-en::before,
.title-en::after {
    content: "";
    flex-grow: 1; /* 文字数に関わらず80%の枠内で線を最大限伸ばす */
    height: 1px;
    background-color: #D7B572;
    margin: 0 15px; /* 文字と線の隙間 */
}

/* 年表用の見出し線色 */
.section-title-white .title-en::before,
.section-title-white .title-en::after {
    background-color: rgba(255, 255, 255, 0.5); 
}

/* 見出しの日本語部分 */
.title-jp {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.5em;
    color: #ECE8EB;
    font-weight: bold;
}


/* ==========================================
   4. 共通コンポーネント（カード・ボタン・モーダル）
========================================== */

/* 黒タイル（商品・コラム用カード） */
.dark-tile {
    background-color: #1C1B1D;
    padding: 45px 40px; /* 2カラム・3カラム用のゆったりした余白 */
    border: 1px solid #D7B572;
    border-radius: 0;
    transition: background-color 0.3s;
    box-sizing: border-box;
}

.dark-tile a {
    display: block;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
}

/* ホバー（選択）時に背景を赤くする */
.dark-tile:hover,
.dark-tile:focus-within {
    background-color: #BE1015;
}

/* 共通CSSによるリンク全体の透過・下線を打ち消す */
.dark-tile a:hover,
.dark-tile a:focus,
.dark-tile a:hover * {
    opacity: 1 !important;
    text-decoration: none !important;
}

/* ホバー時も表紙画像の色・透明度を変えない */
.dark-tile a:hover img,
.dark-tile a:focus img {
    opacity: 1 !important;
    filter: none !important;
}

/* ホバー時も文字色を暗くせず白のまま維持する */
.dark-tile a:hover .title-main,
.dark-tile a:hover .title-sub,
.dark-tile a:hover .book-lead,
.dark-tile a:hover .ontomo-lead {
    color: #ECE8EB;
}

.dark-tile a:hover .title-sub {
    color: #D7B572;
}

/* Rankingバナーのホバー演出（画像枠にピタッと合わせて中央配置＋ほんのり赤くする） */
#beethoven-sp-top #ranking {
    text-align: center;
}
#beethoven-sp-top #ranking a {
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
    opacity: 1 !important;
}
.ranking-banner-wrap {
    display: inline-block;
    position: relative;
    width: 70%;
    max-width: 700px;
    vertical-align: top;
}
.ranking-banner-wrap .img-horizontal {
    display: block;
    width: 100% !important;
    height: auto;
    opacity: 1 !important;
}
.ranking-banner-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(215, 181, 114, 0); /* 通常時は無色透明 */
    transition: background-color 0.3s ease;
    pointer-events: none;
}
#beethoven-sp-top #ranking a:hover .ranking-banner-wrap::after {
    background-color: rgba(215, 181, 114, 0.2); /* ホバー時にごくほんのり金色を帯びる */
}


/* 黒タイル内の画像ラッパー */
.tile-img-bg {
    margin-bottom: 25px;
}

/* 画像サイズ指定（1カラム・2カラム共通で幅280pxに統一） */
.dark-tile img {
    width: 280px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
.img-horizontal {
    width: 70%;
    height: auto;
}

/* タイル内テキスト */
.title-sub {
    font-size: 0.8em;
    line-height: 1.6;
    color: #ECE8EB; /* ゴールドから白文字へ変更 */
    margin: 0.3em 0;
}
.title-main {
    font-size: 1.1em;
    line-height: 1.5;
    font-weight: bold;
    color: #ECE8EB;
    margin: 0.3em 0 0.6em;
}
/* 新刊セクション（New Releases）のみメインタイトル下に下線を入れる */
#new-releases .title-main {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px;
}
.book-lead {
    font-size: 0.85em;
    line-height: 1.8; /* 2カラム等のコメント行間を広げる */
    margin-top: 1em;
    color: #ECE8EB;
}
/* 新刊セレクション（1カラム横並び）のコメント行間は現状のまま維持 */
.tile-horizontal .book-lead {
    line-height: 1.6;
}

/* ボタン（通常時は黒背景＋金枠＆金文字） */
.btn-more {
    display: block;
    width: 100%;
    padding: 22px 20px;
    background-color: #1C1B1D;
    color: #D7B572 !important;
    text-decoration: none !important;
    border: 1px solid #D7B572;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}
/* ホバー（選択）時に赤背景にし、下線・透過を防ぐ */
.btn-more:hover,
.btn-more:focus {
    background-color: #BE1015;
    color: #D7B572 !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

/* モーダルウィンドウ */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    overflow-y: auto; /* 縦長画像でもモーダル内でスクロール可能にする */
    -webkit-overflow-scrolling: touch; /* スマホでのスクロールを滑らかにする */
}
.modal-content {
    margin: 40px auto;
    padding: 20px;
    width: 85%;
    max-width: 700px; /* 縦長画像が見やすいよう少し幅を広げる */
    background: #fff;
    position: relative;
    box-sizing: border-box;
}
.modal-close {
    color: #fff;
    position: fixed; /* スクロールしても右上に固定 */
    top: 30px; 
    right: 40px; 
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}
.modal-close:hover {
    color: #D7B572;
}


/* ==========================================
   5. レイアウトグリッド構成（1カラム/2カラム/3カラム）
========================================== */

/* 2カラム・3カラム（3つ未満の行は左寄せ） */
.col_2, .col_3 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; 
    justify-content: flex-start;
}
.col_2 > div { width: calc(50% - 10px); }
.col_3 > div { width: calc(33.333% - 13.4px); }

/* 1カラム（最新刊枠など） */
.col_1 {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.col_1 > div {
    width: 100%;
}

/* 1カラム内の横並びレイアウト（左：画像、右：テキスト） */
.dark-tile.tile-horizontal {
    padding: 50px 70px; /* 1カラムは左右の余白をさらに広めに確保 */
}
.tile-horizontal .tile-inner {
    display: flex;
    align-items: flex-start;
    gap: 60px; /* 画像とテキストの間隔 */
}
.tile-horizontal .tile-img-bg {
    flex: 0 0 280px; /* 2カラム側のimg幅(280px)と完全一致させる */
    margin-bottom: 0;
}
.tile-horizontal .tile-text-area {
    flex: 1;
    padding-top: 25px; /* 画像の上端より少し下げてバランスを取る */
}


/* ==========================================
   6. セクション固有スタイル：Topics・目次
========================================== */

/* Topics (更新情報) エリア */
.topics-section {
    background-color: #2D2828; 
    padding: 20px 30px;
    margin: 2em auto 0;
    border: none; 
}

/* スクロールエリア */
.topics-scroll-area {
    max-height: 220px; /* 3項目くらいが見える高さに調整 */
    overflow-y: auto;
    padding-right: 15px; /* スクロールバーとの隙間 */
}
.topics-scroll-area::-webkit-scrollbar { width: 8px; }
.topics-scroll-area::-webkit-scrollbar-track { background: #1C1B1D; border-radius: 4px; }
.topics-scroll-area::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }

/* ニュースリスト */
.topics-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.topics-news-list li {
    border-bottom: 1px solid rgba(215, 181, 114, 0.3);
    padding: 15px 0;
}
.topics-news-list li:last-child {
    border-bottom: none;
}
.news-date {
    font-size: 0.85em;
    color: #D7B572;
    margin-bottom: 5px;
}
.news-date .font_red {
    color: #BE1015;
    margin-left: 5px;
}
.news-text {
    font-size: 1em;
    color: #ECE8EB;
}

/* 目次リンク エリア (Topicsの下の別枠) */
.index-link-section {
    background-color: #2D2828; 
    padding: 30px 40px;
    border: none; 
}
.index-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.index-link-list li {
    margin-bottom: 0.8em;
    text-align: left;
}
.index-link-list a {
    color: #ECE8EB;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s;
}
.index-link-list a:hover {
    color: #D7B572;
}


/* ==========================================
   7. セクション固有スタイル：コラム (Column)
========================================== */

/* コラム全体（白透過背景） */
.column-section {
    background: linear-gradient(rgba(230, 228, 225, 0.85), rgba(230, 228, 225, 0.85)), url('../img/fig6_room_dark.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 4em 0;
    margin-top: 4em;
    color: #2D2828;
}

/* クリーム色のコンテンツボックス */
.column-box {
    background-color: #FAF8F5;
    max-width: 780px;
    margin: 0 auto;
    padding: 45px 60px;
    box-sizing: border-box;
}

/* コラムの見出し */
.column-header {
    text-align: center;
    margin-bottom: 1.2em;
}
.column-en {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.1em;
    color: #D7B572;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.column-en::before,
.column-en::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background-color: #D7B572;
    margin: 0 15px;
}

/* コラム冒頭リード文 */
.column-lead {
    font-size: 0.9em;
    line-height: 1.8;
    color: #333333;
    margin-bottom: 1.8em;
}

/* コラム共通メイン画像（元画像を維持したまま横長枠でトリミング表示） */
.column-main-img {
    margin-bottom: 2em;
}
.column-main-img img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center 40%; /* 額の髪〜顎のラインがバランスよく収まる位置 */
    display: block;
}

/* アコーディオン共通・リスト要素（白背景カード） */
.column-item {
    background-color: #FFFFFF;
    padding: 20px 25px;
    margin-bottom: 15px;
}
.column-item summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding-right: 30px;
    outline: none;
}
.column-item summary::-webkit-details-marker {
    display: none;
}
/* アコーディオン開閉矢印 */
.column-item summary::after {
    content: "∨";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #D7B572;
    font-size: 1.1em;
    transition: transform 0.3s;
}
.column-item[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

/* コラム内のメタ情報（日付・NEW）とタイトル */
.column-meta { font-size: 0.8em; margin-bottom: 4px; }
.column-date { color: #9E8A68; }
.column-new { color: #BE1015; font-weight: bold; margin-left: 8px; }
.column-title { font-size: 1.15em; font-weight: bold; color: #2D2828; }

/* 本文エリア */
.column-body {
    margin-top: 1.5em;
    padding-top: 1.5em;
    border-top: 1px solid rgba(215, 181, 114, 0.3);
    font-size: 0.9em;
    line-height: 1.8;
    color: #333333;
}
.column-body p {
    margin-bottom: 1.2em;
}
.column-img {
    margin-bottom: 1.5em;
}
.column-img img {
    width: 100%;
    height: 220px; /* 横長トリミング表示 */
    object-fit: cover;
    display: block;
}

/* クレジット表記（少し小さめ） */
.column-body p.column-credit {
    font-size: 0.85em;
    color: #666666;
    margin-top: 1.5em;
}

/* 「もっとみる」折りたたみエリア */
.column-more-content {
    display: none;
}
.btn-column-more {
    display: block;
    width: 100%;
    margin-top: 1.2em;
    padding: 12px 15px;
    background-color: transparent;
    border: 1px solid #D7B572;
    color: #9E8A68;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}
.btn-column-more:hover {
    background-color: #D7B572;
    color: #FFFFFF;
}

/* 最新回と過去回の区切り線 */
.column-divider {
    border: none;
    border-top: 1px solid rgba(215, 181, 114, 0.5);
    margin: 2.5em 0;
}

/* 過去アーカイブの枠線スタイル */
.column-archive-list .column-item {
    border: 1px solid #D7B572;
    padding: 15px 25px;
    background-color: #FFFFFF;
}
.column-archive-list .column-body {
    border-top: 1px solid rgba(215, 181, 114, 0.3);
    padding-top: 1em;
}


/* ==========================================
   8. セクション固有スタイル：年表 (History)
========================================== */

/* 年表セクション（赤背景） */
.timeline-section {
    background-color: #BE1015;
    padding: 4em 0;
    margin: 0 0 3em;
    position: relative;
    z-index: 0; /* 縦線と●の重なり順をこのセクション内に閉じ込める */
    overflow: hidden;
}

/* 年表との間の余白をなくすため、年表の上marginを0に調整 */
.column-section + .timeline-section,
.timeline-section {
    margin-top: 0;
}

/* 年表内ラッパー（右上にハーフトーン肖像をスクロール追従で配置） */
.timeline-wrapper {
    position: relative;
}


/* テーブル構造 */
.timeline-table {
    width: 68%;
    margin: 0 auto;
    border-collapse: collapse;
    color: #ECE8EB;
}
.timeline-table tr {
    position: relative;
}

/* 年表の縦線 */
.timeline-table tr::before {
    content: "";
    position: absolute;
    left: 20%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #D7B572;
    z-index: 1;
}
/* 最初の行は丸印の中心から開始 */
.timeline-table tr:first-child::before { top: 28px; }
/* 最後の行は丸印の中心で終了 */
.timeline-table tr:last-child::before { bottom: auto; height: 28px; }

/* 年・丸印 */
.timeline-table th.year {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.4em;
    color: #D7B572;
    vertical-align: top;
    padding: 15px 28px 15px 0;
    width: 20%;
    text-align: right;
    border: none;
    box-sizing: border-box;
}
.timeline-table th.year::after {
    content: "";
    position: absolute;
    left: calc(20% - 4px);
    top: 23px;
    width: 10px;
    height: 10px;
    background-color: #D7B572;
    border-radius: 50%;
    z-index: 2;
}

/* 年齢・出来事テキスト */
.timeline-table td.age {
    font-weight: bold;
    vertical-align: top;
    padding: 18px 10px 15px 24px;
    width: 14%;
    white-space: nowrap;
    border: none;
    box-sizing: border-box;
}
.timeline-table td {
    vertical-align: top;
    padding: 18px 0 32px 10px;
    line-height: 1.7;
    border: none;
}

/* 年表内の画像とキャプション */
.timeline-figure {
    margin: 20px auto 5px;
    text-align: center;
}
.timeline-img {
    max-width: 240px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.timeline-caption {
    font-size: 0.75em;
    color: rgba(236, 232, 235, 0.85);
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
}


/* ==========================================
   9. セクション固有スタイル：ONTOMO マガジン
========================================== */

/* 奇数個（最後の1つ）を中央寄せにする */
.grid-ontomo {
    justify-content: center;
}

/* バナー画像をタイル幅いっぱいに綺麗に収める */
.grid-ontomo .img-horizontal {
    width: 100%;
    max-width: 100%;
}

/* リード文の行間・文字サイズ調整 */
.ontomo-lead {
    font-size: 0.85em;
    line-height: 1.8;
    color: #ECE8EB;
    margin-top: 0.5em;
}


/* ==========================================
   10. セクション間余白の一括管理
========================================== */

/* 全セクション間の余白を一括で広げる（約2行分プラス） */
#beethoven-sp-top #content_wrapper > section {
    margin-top: 6em;
}
/* リード文直後のTopicsだけは元の間隔を維持 */
#beethoven-sp-top #content_wrapper > section.topics-section {
    margin-top: 2.5em;
}
/* コラムの上余白（New Releasesとの間）も合わせて広げる */
#beethoven-sp-top .column-section {
    margin-top: 6em;
}
/* 年表の下余白（Biographyとの間）も合わせて広げる */
#beethoven-sp-top .timeline-section {
    margin-bottom: 5em;
}


/* ==========================================
   11. スマホ表示用メディアクエリ（max-width: 640px）
========================================== */
@media screen and (max-width: 640px) {
    
    /* ベースコンテナ・メインビジュアル幅調整 */
    #content_wrapper {
        padding: 0 10px;
    }
    .main-visual-wrapper {
        width: calc(100% + 20px);
        margin-left: -10px;
        padding-top: 0;
    }
	
    /* iPhone Safari最適化：専用レイヤーによる固定背景 */
    main#beethoven-sp-top,
    .column-section {
        background: none;
        position: relative;
        isolation: isolate; /* フッター等に干渉せず背景の重なり順だけを分離 */
    }
    .sp-bg-clip {
        display: block;
        position: absolute;
        inset: 0;
        clip-path: inset(0); /* セクション領域内だけで背景を切り抜く */
        z-index: -1;
        pointer-events: none;
    }
    .sp-bg-fixed {
        position: fixed;
        top: -120px;    /* 上方向のバウンススクロール時の白抜け防止 */
        bottom: -150px; /* 下方向のバー伸縮・バウンス時の白抜け防止 */
        left: 0;
        right: 0;
        background-size: 100% auto;
        background-repeat: repeat-y;
        background-position: top center;
        transform: translate3d(0, 0, 0); /* iOS SafariのGPU描画を強制してチラつき防止 */
        -webkit-transform: translate3d(0, 0, 0);
        will-change: transform;
    }
    .sp-bg-dark {
        background-image: linear-gradient(rgba(45, 40, 40, 0.8), rgba(45, 40, 40, 0.8)), url('../img/room_dark_sp.jpg');
    }
    .sp-bg-light {
        background-image: linear-gradient(rgba(230, 228, 225, 0.85), rgba(230, 228, 225, 0.85)), url('../img/room_dark_sp.jpg');
    }
	
    /* Rankingバナーをスマホ画面幅いっぱいに広げる */
    .ranking-banner-wrap {
        display: block;
        width: calc(100% + 20px);
        max-width: none;
        margin-left: -10px;
    }
	
    /* グリッドレイアウトのスマホ調整 */
    .col_2 > div {
        width: 100%;
    }
    .col_3 {
        gap: 12px;
    }
    .col_3 > div {
        width: calc(50% - 6px); /* スマホ時は横2カラム */
        padding: 15px 12px;
    }

    /* 黒タイルのスマホ用余白調整 */
    .dark-tile {
        padding: 20px;
    }

    /* 最新刊の横並びカードをスマホでは縦積みに戻す */
    .dark-tile.tile-horizontal {
        padding: 20px;
    }
    .tile-horizontal .tile-inner {
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }
    .tile-horizontal .tile-img-bg {
        flex: none;
        width: 100%;
        margin-bottom: 10px;
    }
    .tile-horizontal .tile-text-area {
        padding-top: 0;
    }

   /* コラムのスマホ調整 */
    .column-box {
        padding: 30px 20px;
    }
    .column-main-img img {
        height: 210px;
    }
    .column-item {
        padding: 15px;
    }

    /* 年表のスマホ調整 */
    .timeline-table {
        width: 100%;
        table-layout: fixed; /* 列幅の％指定を厳密に効かせる */
    }
    .timeline-table th.year {
        width: 17%;
        font-size: 1.1em;
        padding-right: 10px;
    }
    .timeline-table tr::before {
        left: 17%;
    }
    .timeline-table tr:first-child::before {
        top: 25px;
    }
    .timeline-table tr:last-child::before {
        height: 25px;
    }
    .timeline-table th.year::after {
        left: calc(17% - 4px);
        top: 20px;
    }
    .timeline-table td.age {
        width: 16%;
        padding-left: 22px;
        padding-right: 0;
    }
    /* 右側の余白を2文字分広げる */
    .timeline-table td:last-child {
        width: 67%;
        padding-right: 2em;
    }
    /* 写真とキャプションを画面幅のど真ん中に配置 */
    .timeline-figure {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(-49.25% - 20px);
        padding: 0 20px;
        box-sizing: border-box;
    }
    /* キャプションを写真幅（240px）に合わせて折り返す */
    .timeline-caption {
        max-width: 240px;
        margin-left: auto;
        margin-right: auto;
    }
    /* 「〜の商品をすべて見る」ボタンのスマホ時行間調整 */
    .btn-more {
        line-height: 1.7;
        padding: 18px 16px;
    }
}