/* ==========================================================================
   ベース設定 & カラーパレット（Deep Navy & Warm Greige）
   ========================================================================== */
:root {
    --bg-dark: #0f172a;        /* 深みのあるスタイリッシュなネイビーブラック */
    --bg-card: #1e293b;        /* コンテナ用の少し明るいディープネイビー */
    --text-main: #f8fafc;      /* クリーンなオフホワイト */
    --text-sub: #94a3b8;       /* 柔らかいグレー */
    --accent: #e2e8f0;         /* アクセントホワイト */
    --accent-warm: #ebdcb9;    /* ★シフォンゴールド */
    --font-en: 'Poppins', sans-serif;
    --font-ja: 'Noto Sans JP', sans-serif;
    --theme-bg-light: rgba(235, 220, 185, 0.1); /* 今回指定された薄い色（背景用） */
    --theme-color-solid: rgba(235, 220, 185, 1);    /* 同じ色合いで透明度なし（文字や枠線用） */
    }
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-en), var(--font-ja);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ==========================================================================
   ヘッダー（ナビゲーション）
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    height: 80px; /* ここが高さの基準です */
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8); /* 背景をシアー（半透明）に */
    backdrop-filter: blur(12px); /* すりガラス効果 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-content {
    padding-top: 80px; /* ヘッダーの高さと同じ数値を指定 */
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--text-main);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-item {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent-warm); /* ホバーすると温かみのあるゴールドに */
}

/* スマホ対応：ナビゲーションがはみ出さないように自動で横スクロール可能に */
@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 10px;
    }
    .nav-menu {
        gap: 15px;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
}

/* ==========================================================================
   ヒーローセクション（アーティスト写真エリア）
   ========================================================================== */
   .hero-section {
    margin-top: 80px; /* ヘッダーの高さ分あける */
    padding: 40px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* スタイリッシュな角丸の大きな写真枠 */
.hero-image-container {
    width: 100%;
    height: 60vh; /* 少し高さを広げて写真を主役に */
    min-height: 400px;
    border-radius: 24px;
    overflow: hidden; /* 枠からはみ出た画像を隠す */
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background-color: var(--bg-card); /* 画像が読み込まれる前の保険背景 */
}

.hero-image-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

/* ★アーティスト写真のスタイリング */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像の比率を崩さずに、枠いっぱいに綺麗に広げる魔法のコード */
    object-position: center; /* 画像の中心を基準に表示 */
    filter: brightness(0.75) contrast(1.05); /* ★文字を読みやすくするため、ほんの少しだけ暗くして雰囲気を出す */
    display: block;
    
    /* じわーっと拡大する」アニメーションを設定 */
    animation: slowZoom 20s infinite alternate cubic-bezier(0.25, 1, 0.5, 1);
}

/* 写真の上に重なる文字のエリア */
.hero-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2; /* 画像より手前に表示 */
}

.hero-text {
    animation: fadeIn 1.5s ease forwards;
}

.hero-text-overlay h2 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
    color: var(--text-main);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* 文字の後ろに影をつけて読みやすく */
}

.hero-text-overlay p {
    font-size: 1rem;
    letter-spacing: 0.4em;
    color: var(--text-sub);
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ★ゆっくり拡大・縮小を繰り返すアニメーション（重くならない軽量な動き） */
@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08); /* 1.08倍までゆっくり大きくする */
    }
}

/* ==========================================================================
   Bento Grid（タイル状レイアウト）
   ========================================================================== */
   .grid-container {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* PC時は2カラム */
    gap: 24px;
}

/* ★新演出：YouTube動画をPCの時に横幅いっぱいに広げてダイナミックに見せる */
.youtube-box {
    grid-column: 1 / -1; /* 左端から右端まで2マス分ぶち抜く魔法のコード */
}

/* スマホ・タブレット時はすべて1列にして絶対崩れないようにする */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .youtube-box {
        grid-column: auto; /* スマホの時は自動で1マス分の幅に戻す */
    }
}

.grid-item {
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    border-color: rgba(235, 220, 185, 0.2);
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--accent-warm);
    border: 1px solid rgba(235, 220, 185, 0.3);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 25px;
    font-weight: 500;
}

/* --- 1. リリースエリア --- */
.release-content {
    display: flex;
    gap: 25px;
    align-items: center;
}

@media (max-width: 500px) {
    .release-content {
        flex-direction: column;
        text-align: center;
    }
}

.jacket-placeholder {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #334155, #1e293b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: var(--text-sub);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.release-info h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

.release-date {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 20px;
}

.linkcore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--text-main);
    color: var(--bg-dark);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.linkcore-btn:hover {
    background-color: var(--accent-warm);
    transform: scale(1.03);
}

/* --- 2. connectリンクエリア（CONNECT） --- */
.connect-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 通常はボタンを2列に並べる */
    gap: 12px;
}

.connect-icon-btn {
    display: flex;
    align-items: center; /* アイコンと文字を上下中央で揃える */
    justify-content: flex-start; /* 左寄せ */
    gap: 12px; /* アイコンと文字の間のすき間 */
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

/* アイコン自体の大きさ設定 */
.connect-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0; /* 画面が狭くなってもアイコンが潰れないようにする */
}

.connect-icon-btn:hover {
    background: var(--theme-bg-light);
    border-color: var(--accent-warm);
    color: var(--accent-warm);
    transform: translateX(3px); /* ホバー時の小粋な演出 */
}

/* ===================================================
   【最終決戦版】位置リセット＆アニメーション停止CSS
   =================================================== */
 /* ===================================================
   【完全解決版】外側の親の箱ごとSafariのバグを解除するCSS
   =================================================== */
@media (max-width: 768px) {
    
    /* 1. connectの箱を包んでいる「外側の親要素」のSafariバグを強制解除 */
    div:has(> .connect-box) {
        /* Safariが一番苦手な「スマホでの複雑なGrid計算」を諦めさせ、素直な縦並びに変えます */
        display: block !important;        
        height: auto !important;
        min-height: 1px !important;
        overflow: visible !important;     /* 万が一枠外にはみ出しても絶対に隠さない */
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 2. connectの箱自体の位置と表示をスマホ用に最適化 */
    .grid-item.connect-box {
        grid-column: auto !important;
        grid-row: auto !important;
        display: block !important; 
        width: 100% !important;            
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        
        /* アニメーションのフリーズバグを解除 */
        animation: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important; 
    }

    /* 3. ボタンの並び（スマホでも綺麗で安全な2列をキープ！） */
    .connect-links {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* 画面にピタッと収まる2列 */
        gap: 8px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ボタン内のデザイン調整 */
    .connect-icon-btn {
        padding: 12px 14px !important;
        font-size: 0.85rem !important;
        justify-content: flex-start !important;
    }
}

/* 4. 画面幅が400px以下のめちゃくちゃ細いスマホの時だけ、安全のために1列にする */
@media (max-width: 400px) {
    .connect-links {
        grid-template-columns: 1fr !important;
    }
}

/* --- 3. YouTubeエリアのレスポンシブ対応 --- */
.video-wrapper {
    position: relative;
    padding-bottom: 51%; /* ★幅広画面（2マスぶち抜き）に合わせて少し動画をシネマティックな比率に調整 */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .video-wrapper {
        padding-bottom: 56.25%; /* スマホの時は通常の16:9に戻す */
    }
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   アニメーション設定（動作を重くしない軽量なCSSモーション）
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseLight {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.2); opacity: 1; }
}

.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    opacity: 0; /* 最初は非表示にしてアニメーションで出す */
}

/* ==========================================================================
   フッター
   ========================================================================== */
.main-footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.75rem;
    color: var(--text-sub);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    letter-spacing: 0.05em;
}

/* ==========================================================================
   PROFILE ページ専用スタイル
   ========================================================================== */
   .profile-container {
    max-width: 1200px;
    margin: 60px auto 100px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 4.5fr 7.5fr;
    gap: 60px;
    /* align-items: start; を削除して、左右の部屋の高さを揃えます */
}

/* 左側の部屋自体を、右側の年表と同じ高さまで縦に引き伸ばす魔法 */
.profile-image-area {
    height: 100%;
}

/* スマホ・タブレット時は1列に並び替える */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-top: 30px;
    }
}

/* --- 左側：写真エリアの装飾 --- */
.profile-image-box {
    width: 100%;
    position: sticky;
    top: 140px; /* スクロールしても写真が画面上部で心地よく固定される演出 */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.profile-img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
    display: block;
}

/* --- 右側：文章エリアの装飾 --- */
.page-title {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-main);
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

/* タイトルの下に引くアクセントライン */
.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-warm);
}

.bio-lead {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
    letter-spacing: 0.05em;
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-sub);
    margin-bottom: 30px;
}

/* --- タイムライン（年表）の構造 --- */
.timeline {
    position: relative;
    padding-left: 25px; /* 縦線の右側に余白を作る */
}

/* タイムラインの中央を走る細い縦線 */
.timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
}

/* タイムラインの節目に置く小さな「丸ぽち」 */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 7px;
    left: -25px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--text-sub);
    transform: translateX(-50%);
    transition: background-color 0.3s ease;
}

.timeline-date {
    font-family: var(--font-en);
    font-size: 0.9rem;
    color: var(--text-sub);
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.timeline-content {
    font-size: 0.95rem;
    color: rgba(248, 250, 252, 0.9);
}

/* --- 実績ハイライト用の装飾 --- */
.highlight-item::after {
    background-color: var(--accent-warm); /* フランスランクインの年は丸ぽちをゴールドに */
    box-shadow: 0 0 8px var(--accent-warm);
}

.release-title {
    margin-bottom: 6px;
}

/* フランス1位・2位を上品に引き立てるシアーバッジ */
.chart-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-sub);
}

/* 特に1位（ALIVE）は少しゴールドを乗せてプレミアム感を演出 */
.gold-badge {
    background: rgba(235, 220, 185, 0.08);
    border-color: rgba(235, 220, 185, 0.2);
    color: var(--accent-warm);
}

/* ==========================================================================
   DISCOGRAPHY ページ専用スタイル
   ========================================================================== */
   .disco-container {
    max-width: 1200px;
    margin: 60px auto 100px;
    padding: 0 20px;
}

/* ★超優秀な自動レスポンシブグリッド
   画面幅に合わせて、1列 → 2列 → 3列 → 4列 と自動で最適に並び替わります */
.disco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.disco-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column; /* カード内で中身を縦並びにする */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease;
}

.disco-card:hover {
    transform: translateY(-6px);
    border-color: rgba(235, 220, 185, 0.2);
}

/* --- ジャケット写真エリア --- */
.jacket-area {
    width: 100%;
    aspect-ratio: 1 / 1; /* 正方形を絶対に維持する魔法 */
    position: relative;
    overflow: hidden;
    background-color: #1e293b;
}

.jacket-placeholder-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-sub);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* カードをホバーすると、ジャケット写真が少しだけ拡大するスタイリッシュ演出 */
.disco-card:hover .jacket-placeholder-large {
    transform: scale(1.05);
}

/* SINGLE / ALBUM を識別する小さなラベル */
.disco-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: var(--accent-warm); /* シングルは温かみのあるゴールド */
    font-weight: 500;
    border: 1px solid rgba(235, 220, 185, 0.2);
}

.disco-badge.album {
    color: #93c5fd; /* アルバムは爽やかなシアーブルーに変化 */
    border-color: rgba(147, 197, 253, 0.2);
}

/* --- 楽曲情報エリア --- */
.disco-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* 中身の量に関わらず、ボタンの位置をカード最下部で揃える */
}

.disco-date {
    font-family: var(--font-en);
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.disco-title {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

/* 収録曲リストのスタイリング */
.tracklist {
    list-style: none;
    margin-bottom: 25px;
    flex-grow: 1; /* リストが伸びても、下のボタンを綺麗に押し下げる */
}

.tracklist li {
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.8);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 文字が長すぎたら自動で「...」にする */
}

.tracklist .more-tracks {
    color: var(--text-sub);
    border-bottom: none;
    font-style: italic;
}

/* LinkCoreに繋ぐ極細アウトラインボタン */
.disco-link-btn {
    display: block;
    text-align: center;
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    padding: 10px 0;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.disco-link-btn:hover {
    background: var(--theme-bg-light);
    border-color: var(--accent-warm);
    color: var(--accent-warm);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   DISCOGRAPHY：COMING SOON 専用演出
   ========================================================================== */
/* カード全体を半透明＆点線枠に */
.disco-card.coming-soon {
    border: 1px dashed rgba(235, 220, 185, 0.25); /* ゴールドの点線枠 */
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    opacity: 0.85;
}

/* アートワーク部分を中央から発光させるグラデーション */
.jacket-placeholder-large.upcoming {
    background: radial-gradient(circle, rgba(235, 220, 185, 0.08) 0%, #1e293b 80%);
    color: rgba(235, 220, 185, 0.3);
    font-size: 3rem;
    font-weight: 300;
    font-family: var(--font-en);
}

/* COMING SOONバッジをじわじわ明滅させる（パルスアニメーション） */
.disco-badge.upcoming-badge {
    background: rgba(235, 220, 185, 0.15);
    color: var(--accent-warm);
    border-color: var(--accent-warm);
    animation: pulseGlow 2s infinite alternate cubic-bezier(0.4, 0, 0.6, 1);
}

/* まだ押せないボタンのスタイリング */
.disco-link-btn.disabled {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-sub);
    border-color: rgba(255, 255, 255, 0.05);
    pointer-events: none; /* マウスでクリックできないようにロックする魔法のコード */
    cursor: default;
}

/* じわじわ光るアニメーションの計算式 */
@keyframes pulseGlow {
    0% {
        opacity: 0.6;
        box-shadow: 0 0 5px rgba(235, 220, 185, 0.1);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(235, 220, 185, 0.5);
    }
}

/* --- ディスコグラフィー：実際のジャケット画像用の設定 --- */
.jacket-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像を歪ませずに、正方形の枠いっぱいに綺麗に収める魔法 */
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* ホバー時のなめらかな動き */
}

/* カードをホバーしたとき、画像がじわっと拡大する演出 */
.disco-card:hover .jacket-img {
    transform: scale(1.05);
}

/* ==========================================================================
   LYRICS ページ専用スタイル
   ========================================================================== */
/* LYRICS ページ専用：タイトル周りの余白を調整 */
.lyrics-container {
    max-width: 1200px;
    margin: 60px auto 100px;
    padding: 0 20px;
}

/* タイトル見出し自体の余白 */
.page-title {
    margin-bottom: 30px; /* 見出しとサイドバー/歌詞エリアの間の隙間 */
}

   /* サイドバーレイアウト */
.lyrics-wrapper { display: flex; gap: 30px; align-items: flex-start; }

/* --- 基本設定 --- */
/* --- サイドバーの基本設定 --- */
.lyrics-sidebar {
    width: 300px;
    background: var(--bg-dark);
    z-index: 1000;
}

/* --- スマホ用の設定（768px以下） --- */
/* ==========================================
   スマホ・タブレット用の設定（768px以下）
========================================== */
@media (max-width: 768px) {
    
    /* MENUボタン：画面の左上に完全に固定（ヘッダーが二段になっても絶対に押せる） */
    .menu-toggle-btn {
        display: block !important;
        position: fixed;
        top: 100px;
        left: 15px;
        z-index: 2500; /* 何よりも一番上に表示 */
        background: #333;
        color: #fff;
        border: 1px solid #fff;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
    }

    /* サイドバー：画面の上部に移動してしまう問題を、
       「最初から画面全体を覆う引き出し」にすることで仕様（デザイン）に変えます */
    .lyrics-sidebar {
        position: fixed;
        /*top: 0;
        /* ★ここを調整：画面上部からどれくらい下げるか（例: ヘッダーの高さが70pxなら70pxにする） */
        top: 80px; 
        /* ★重要：上を下げた分、全体の高さ（100vh）からその px 分を引き算する */
        height: calc(100vh - 80px);
        
        /* --- 修正・追加ここから --- */
        left: 0; /* 横位置の基準は左端に固定 */
        box-sizing: border-box; /* 余白を足しても幅300pxを絶対超えないようにするお守り */
        transform: translateX(-100%); /* 横幅が何pxであっても、影ごと100%完全に画面外へ引っ込める */
        transition: transform 0.3s ease; /* アニメーションの対象を transform に変更 */
        /* --- 修正・追加ここまで --- */

        width: 300px;
        /*height: 100vh; /* 画面の上から下までぴったり */
        background: #222; /* 背景色（文字が見えるように濃い色に） */
        z-index: 3000; /* MENUボタンやヘッダーよりも手前に出す */
        transition: left 0.3s ease;
        overflow-y: auto; /* リストが長くてもスクロールできるように */
        padding: 60px 20px 20px 20px; /* 上部に✕ボタンのための余白を空ける */
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }

    /* メニューが開いたとき */
    .lyrics-sidebar.open {/* メニューが開いたときの動きを修正 */
        transform: translateX(0); /* 画面内の元の位置（0の位置）にスッと戻す */
    }

    /* ✕ボタンの配置 */
    .close-menu-btn {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
    }

 /* --- 暗幕（メニューの背景）の設定を探して、以下のように書き換えるか追加してください --- */
.menu-overlay {
    position: fixed;
    top: 70px;
    height: calc(100vh - 70px);
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999; /* サイドバー(3000)より低く、メイン(先頭)より高く */
    
    /* 枠線や余白の計算バグを防ぐ */
    box-sizing: border-box;

    /* ★ここを追加：閉じている時は、透明にして、クリックも完全に「スルー」させる */
    opacity: 0;
    pointer-events: none; 
    transition: opacity 0.3s ease;
}

/* メニューが開いているとき */
.menu-overlay.open {
    opacity: 1;
    /* ★ここを追加：開いている時だけ、クリックできるようにする */
    pointer-events: auto; 
}
}

/* ==========================================
   PC用の設定（769px以上）★元に戻すための設定
========================================== */
@media (min-width: 769px) {
    .menu-toggle-btn,
    .close-menu-btn,
    .menu-overlay {
        display: none !important; /* PCでは全部非表示 */
    }

    .lyrics-sidebar {
        position: relative; /* PCでは元の位置（歌詞の左側）に居座る */
        left: 0 !important;
        width: 300px; /* 元のサイズ */
        height: auto;
        padding: 0;
        box-shadow: none;
    }
}

/* 普段は非表示、クリックもすり抜ける */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明の黒 */
    z-index: 999; /* サイドバー(1000)より一段下 */
    pointer-events: none; /* 初期状態ではクリックを透過させる */
}

/* メニューが開いた状態（JavaScriptでクラスが付与されたとき） */
.menu-overlay.open {
    display: block;
    pointer-events: auto; /* クリックできるようにする */
}

.lyrics-display-area { flex: 1; }

/* 歌詞カード */
/* 1. 歌詞カード全体（親要素） */
/* 1. 歌詞カード全体の箱 */
.lyrics-display-box {
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    height: 600px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 2. 歌詞がスクロールするエリア（ここが重要） */
.lyrics-scroll-area {
    height: 100%;
    overflow-y: auto;
    position: relative;
    padding: 40px; /* ★ここを足すことで全体に余白ができます */
    box-sizing: border-box; /* パディングを高さに含める */
}
.lyrics-bg-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; background-size: cover; background-position: center;
    filter: blur(8px) brightness(0.5); transition: opacity 0.5s; opacity: 0;
}
.song-title {
    margin-top: 0;
    padding-top: 10px; /* ボタンとの距離を確保 */
    font-size: 1.5rem;
}
/* 歌詞の中身 */
.lyrics-content-wrapper {
    position: relative;
    z-index: 1;
    /* パディングは .lyrics-scroll-area で管理するのでここは不要 */
}

/* 戻るボタン (絶対配置で右上に固定) */
/* 右上のボタンエリアを「追従（sticky）」に設定 */
/* 3. 戻るボタンの固定エリア */
/* ボタンを包む外枠 */
/* ===================================================
   【修正版】JSのバグを無視して絶対に右寄せにする設定
   =================================================== */

/* ボタンを包む外枠 */
/* ===================================================
   【今度こそ完成版】ボタンだけを右上にピン留めするCSS
   =================================================== */

/* 歌詞エリア全体の大枠（ボタンを固定する基準点にします） */
#lyricsDisplayBox {
    position: relative !important;
}

/* 戻るボタンの枠（スクロールの外にあるので、絶対に流れません） */
#backButtonContainer {
    position: absolute !important;
    top: 25px;        /* 💡上からの位置（タイトルの初期位置に合わせて調整してください） */
    right: 25px;      /* 💡右端からの隙間 */
    z-index: 1000;    /* スクロールしてきた歌詞の文字より手前に浮かせます */
    
    display: flex !important;
    justify-content: flex-end !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ボタン自体のデザイン（ここは前のままでバッチリです！） */
.back-to-album-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--theme-color-solid, #ebdcba);         /* ベージュ（文字） */
    border: 1px solid var(--theme-color-solid, #ebdcba);   /* ベージュ（枠線） */
    padding: 6px 16px;                                 
    border-radius: 25px;                               /* 丸み */
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;                         
    white-space: nowrap;                               /* 文字の改行をガード */
}

/* マウスをのせたとき（ホバー時） */
.back-to-album-btn:hover {
    background-color: var(--theme-bg-light, rgba(235, 220, 185, 0.1)); 
    transform: scale(1.03);                            
}

/* リストの点を消す */
.lyrics-menu {
    list-style: none; /* ここで点が消えます */
    padding: 0;       /* 余計な内側の余白も消す */
    margin: 0;
}

/* ついでに、リスト項目間の余白を整える場合 */
.lyrics-menu li {
    margin-bottom: 8px; /* 各項目の間に少し隙間を空ける */
}
/* 普段のボタン */
.lyrics-menu-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03); /* もっと薄く */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7); /* 少しグレーにして文字を馴染ませる */
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease; /* 滑らかに変化させる */
}

/* 選択中のボタン（ここをおしゃれにする） */
.lyrics-menu-btn.active {
    background: rgba(255, 204, 51, 0.1); /* 背景はごく薄い黄色にする */
    border: 1px solid var(--accent-warm); /* 枠線だけしっかり出す */
    color: var(--accent-warm); /* 文字色を黄色にする */
    box-shadow: 0 0 10px rgba(255, 204, 51, 0.2); /* ほんのり光らせる */
    transform: translateX(5px); /* 少し右にずらして「選択中」を強調 */
}

/* マウスを乗せたときも少し反応させる */
.lyrics-menu-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
/* トラックリスト */
.track-item {
    padding: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer; display: flex; align-items: center;
}
.track-item:hover { background: rgba(255, 255, 255, 0.1); }
.track-num { margin-right: 15px; opacity: 0.5; }

.close-menu-btn {
    display: none; /* スマホのときだけ表示 */
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--accent-warm);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .close-menu-btn {
        display: block; /* スマホなら表示 */
    }
}

/* 歌詞がまだ無いときの Coming soon... のデザイン */
.coming-soon-box {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;         /* 縦方向にもある程度真ん中に来るように */
    font-size: 24px;           /* 文字の大きさ */
    font-weight: bold;
    font-style: italic;        /* オシャレな斜体（ななめ文字） */
    color: var(--accent-warm, #888); /* 少し薄めの色（変数があればそれに合わせる） */
    letter-spacing: 3px;       /* 文字と文字の間隔を少し広げて垢抜けた印象に */
    opacity: 0.7;              /* ほんのり透明感を出す */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* 軽い影 */
}