/* 背景WebP ＋ サイト全体フォント（新ゴ・太字）確定設定 */
html, body {
    background-image: url('images/bg_main.webp') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    font-family: "A-OTF Shin Go Pro B", "A-OTF Shin Go Pro", "A-OTF Shin Go Pr6N", "shin-go", sans-serif !important;
}

/* --- ① 全体基本設定 --- */
* { margin: 0; padding: 0; box-sizing: border-box !important; }

html, body { 
    background-color: #FFFFFF; 
    color: #333; 
    font-weight: 900; overflow-x: hidden; width: 100%; scroll-behavior: smooth; 
}

.container { 
    width: 100%; max-width: 1200px; margin: 0 auto; 
    padding: 0 5% !important; 
}

.movie-description { padding: 40px 15px; text-align: center; }
.movie-description p { font-size: min(4vw, 1.1rem); line-height: 2; font-weight: 900; color: #FFFFFF; }

/* --- ② ヘッダー --- */
.navbar { background: rgba(255, 255, 255, 0.95); position: fixed; top: 0; width: 100%; z-index: 1000; border-bottom: 3px solid #F8ABA6; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.1rem; font-weight: 900; color: #F8ABA6; }
.menu-toggle { display: none; }
.menu-button-label { position: fixed; bottom: 30px; right: 0px; z-index: 5000; cursor: pointer; transition: transform 0.2s; }
.menu-icon-img { width: 200px; height: auto; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); }
.nav-links { position: fixed; top: 0; left: 0; width: 100%; background: #fff; max-height: 0; overflow: hidden; transition: 0.3s; z-index: 4000; }
.menu-toggle:checked ~ .nav-links { max-height: 100vh; padding-top: 60px; border-bottom: 5px solid #F8ABA6; }
.nav-links ul li { border-bottom: 1px solid #FFEFDB; list-style: none; text-align: center; }
.nav-links ul li a { display: block; padding: 15px; color: #333; text-decoration: none; font-weight: 900; }
.close-menu-btn { background: #FFFAF0; color: #F8ABA6; display: block; padding: 20px; text-align: center; font-weight: 900; cursor: pointer; }

/* --- ③ 見出し設定 --- */
.section-title { 
    margin: 120px auto 5px !important; 
    text-align: center; 
    clear: both; 
}
.section-title > img { height: 120px !important; width: auto !important; max-width: 90%; object-fit: contain; display: block; margin: 0 auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.visual-logo { width: 100%; display: flex; justify-content: center; align-items: center; padding: 30px 0; }
.visual-logo img { width: min(85vw, 550px); height: auto; filter: drop-shadow(0 0 15px rgba(0,0,0,0.3)); animation: buon-buon 3s ease-in-out infinite; }
@keyframes buon-buon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* --- 【画像スライド】 --- */
.slider-banner { width: 100%; overflow: hidden; background: transparent; padding: 0; margin: 40px 0; white-space: nowrap; }
.slider-track { display: inline-flex; gap: 0; animation: scroll-left 40s linear infinite; }
.slider-track.reverse { animation: scroll-right 40s linear infinite; }
.slider-track img { width: 100vw !important; height: auto !important; display: block; }

/* --- ④ CM GALLERY --- */
.cm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; width: 100%; }
.cm-card { display: block !important; opacity: 1 !important; transform: none !important; text-decoration: none; background: none !important; padding: 0 !important; border: none !important; overflow: visible !important; position: relative !important; }
.cm-thumbnail { width: 100% !important; height: auto !important; display: block !important; opacity: 1 !important; transition: transform 0.4s ease, filter 0.4s ease; border-radius: 12px !important; }
.cm-card:hover .cm-thumbnail { transform: scale(1.1) !important; filter: saturate(1.5) brightness(1.1) sepia(0.2) !important; }
.cm-thumb-box { display: none !important; }
.cm-hover-overlay { position: absolute !important; top: 42%; left: 50%; transform: translate(-50%, -50%) scale(0.8); width: 120%; height: auto; opacity: 0; transition: all 0.4s ease; z-index: 100 !important; pointer-events: none; }
.cm-card:hover .cm-hover-overlay { opacity: 1 !important; transform: translate(-50%, -50%) scale(1); }

/* --- ⑤ 動画セクション --- */
.scroll-visual { width: 100%; height: auto; background: #000; border-top: 5px solid #fff; border-bottom: 5px solid #fff; margin: 40px 0; position: relative; overflow: hidden; }
.visual-video { width: 100%; height: auto; display: block; max-width: 100% !important; }
.visual-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.2); display: flex; justify-content: center; align-items: center; }

/* --- ⑥ CHARACTERS --- */
.char-grid-flat { 
    display: flex; 
    justify-content: center; 
    align-items: flex-end; 
    gap: 15px; 
    width: 100%; 
    max-width: 1000px; 
    margin: 60px auto 180px !important; 
    flex-wrap: wrap; 
}
.char-panel { 
    display: block; 
    position: relative; 
    text-decoration: none; 
    transition: transform 0.3s ease, filter 0.3s ease; 
    height: 200px; 
    width: auto; 
}
.char-panel:hover { 
    transform: translateY(-10px); 
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4)); 
}
.char-img { 
    height: 150%; 
    width: auto; 
    object-fit: contain; 
    display: block; 
}


/* --- ⑦ MUSIC --- */
.music-grid { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 12px !important; max-width: 1100px !important; margin: 0 auto !important; }
.music-thumb-box { width: 96% !important; aspect-ratio: 1/1 !important; margin: 0 auto !important; position: relative !important; overflow: visible !important; border-radius: 0 !important; background: transparent !important; border: none !important; }
.music-default-img { width: 100% !important; height: 100% !important; object-fit: contain !important; border-radius: 0 !important; position: absolute !important; top: 0 !important; left: 0 !important; animation: record-rotate 15s linear infinite !important; z-index: 1 !important; }
.music-hover-img { width: 100% !important; height: 100% !important; object-fit: contain !important; border-radius: 0 !important; position: absolute !important; top: 0 !important; left: 0 !important; opacity: 0 !important; z-index: 5 !important; transition: opacity 0.3s ease !important; pointer-events: none !important; }
.music-card:hover .music-hover-img { opacity: 1 !important; }

/* --- ⑧ ARCHIVE --- */
.archive-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; width: 100%; padding: 20px 0; }
.archive-grid a { display: block; text-decoration: none; transition: transform 0.3s ease; outline: none; border: none; }
.archive-grid img { width: 100%; height: auto; display: block; border-radius: 0; box-shadow: none !important; transition: all 0.3s ease; }
.archive-grid a:hover { transform: translateY(-5px); }
.archive-grid a:hover img { filter: brightness(1.1); }

/* --- ⑨ FOOTER --- */
.footer { padding: 60px 0; text-align: center; background: #FFFFFF; color: #F4C7C8; border-top: 5px solid #F8ABA6; }
.animated-logo { width: 220px; animation: logo-bounce-spin 5s linear infinite; margin-bottom: 30px; }
.footer-sns-grid { display: flex; justify-content: center; gap: 20px; margin: 20px auto; width: 100%; }
.sns-img-link { display: block; width: 350px; border-radius: 12px; overflow: hidden; border: 2px solid #FFBBBC; max-width: 100%; }
.sns-img-link img { width: 100%; display: block; }

@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scroll-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes record-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes logo-bounce-spin { 0%, 70% { transform: translateY(0) rotate(0deg); } 80% { transform: translateY(-15px) rotate(0deg); } 100% { transform: translateY(0) rotate(360deg); } }

/* --- ⑩ スマホ対応 --- */
@media (max-width: 768px) {
    .container { padding: 0 15px !important; }
    .cm-grid { 
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr) !important; /* 2列に固定 */
        gap: 8px !important; 
        padding: 0 10% !important; 
    }
    
    .cm-card { 
        width: 100% !important; /* グリッドのセル幅いっぱいにする */
        display: block !important;
        padding: 0 !important;
        box-sizing: border-box !important; 
    }
    .music-grid { grid-template-columns: repeat(2, 1fr) !important; padding: 0 5% !important; gap: 10px !important; }
    .music-thumb-box { width: 100% !important; margin: 0 auto !important; position: relative !important; }
    .char-grid-flat { 
        display: grid !important; 
        grid-template-columns: repeat(3, 1fr) !important; 
        max-width: 280px !important; 
        padding: 0 !important; 
        margin: 0 auto 100px !important; 
    }
    .char-panel { display: flex !important; flex-direction: column !important; height: auto !important; align-items: center !important; }
    .char-img { height: auto !important; width: 100% !important; object-fit: contain !important; }
    .archive-grid { grid-template-columns: repeat(6, 1fr) !important; gap: 2px !important; padding: 0 12% 10px !important; width: 100% !important; }
    .footer-sns-grid { flex-direction: column; align-items: center; gap: 15px; }
	.animated-logo { 
        width: 150px !important; /* ★ここを 220px から 120px くらいに小さくする */
        margin-bottom: 20px !important; 
    }
    .sns-img-link { width: 60% !important; }
    .section-title img { height: auto !important; width: 80%; max-width: 350px; }
    .menu-button-label { right: -10px !important; bottom: 15px !important; }
    .menu-icon-img { width: 120px !important; }
    .slider-track img { width: 250vw !important; max-width: none !important; height: auto !important; }
    .copyright { width: 100% !important; text-align: center !important; margin: 20px 0 !important; white-space: nowrap; font-size: min(2.5vw, 0.7rem); }
    .movie-description p { font-size: 12px !important; }
}

/* --- ⑪ MODAL --- */
.modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 9000; opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.modal:target { opacity: 1; pointer-events: auto; }
.modal-content { position: relative; width: 90%; max-width: 600px; background: #fff; border: 5px solid #ffffff; display: flex; flex-direction: column; }
.char-intro { padding: 20px; }
.char-intro p { line-height: 1.8; color: #333; font-weight: 900; }
.modal-close-x { position: absolute; top: -20px; right: -20px; width: 40px; height: 40px; background: #F8ABA6; color: #fff; border: 3px solid #fff; border-radius: 50%; text-align: center; line-height: 34px; font-size: 24px; text-decoration: none; font-weight: 900; }

/* --- 12. 白い枠（セクション）の基本設定 --- */
.section-card-inner {
    background-color: #FFFFFF !important;
    border: 3px solid #F8ABA6 !important;
    border-radius: 60px !important;
    margin: 80px auto !important; 
    width: 75% !important; 
    max-width: 1000px !important; 
    padding: 60px 5% !important; 
    box-shadow: 0 15px 40px rgba(248, 171, 166, 0.2) !important;
    text-align: center !important;
    /* はみ出しを物理的にカット */
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* --- 13. タイトル画像を枠内に収める（はみ出し防止） --- */
.section-card-inner .section-title {
    margin: 0 auto 40px !important;
    width: 100% !important;
    display: block !important;
}
.section-card-inner .section-title img {
    /* 親要素の幅を絶対に超えない設定 */
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
}

/* --- 14. 曲（MUSIC）グリッドの復活 --- */
.music-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* --- 15. CM・歴代サイトの段差設定 --- */
.cm-thumbnail, #archive .archive-grid img {
    border: none !important;
    box-shadow: none !important;
}
#archive .archive-grid img { border-radius: 50% !important; }

/* --- 16. キャラクター下の画像：幅70%・中央寄せ --- */
.char-footer-visual {
    width: 60% !important;
    margin: 100px auto !important; /* 上下の隙間120px + 左右中央寄せ */
    display: flex;
    justify-content: center;
}

.char-footer-visual img {
    width: 100% !important;
    height: auto !important;
    filter: none !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* --- 17. スマホ表示の最終まとめ --- */
@media (max-width: 768px) {
    .section-card-inner { 
        width: 85% !important; 
        padding: 30px 15px !important; 
        border-radius: 30px !important; 
        margin: 20px auto !important; /* ★ここ修正（上下の隙間を狭くした） */
    }
    .music-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .archive-grid { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 8px !important; }
    .archive-grid a { width: 45px !important; }
    
    .char-footer-visual { margin: 20px auto !important; } /* ★ここ追加（1枚画像自体の余白） */
    
    .char-footer-visual img { width: 135% !important; }
    .section-card-inner .section-title img { max-width: 100% !important; }
}