.group figure figcaption {
    font-size: 1.25em;
    margin-top: 10px;
}
@media (max-width: 768px) {
    .side-menu {
        height: 100vh;
        height: 100dvh;
        padding-bottom: 80px;
    }
}
/* メニューが開いているときはmenuiconを非表示 */
.side-menu.open ~ button#modalBtn {
    display: none;
}

/* イントロ中はmenuボタンを非表示 */
body.index-page.intro-active button#modalBtn {
    display: none;
}
/* --- main-title レイアウト調整 --- */
.main-title {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
    z-index: 0;
}
.main-line {
    text-align: left;
    max-width: 500px;
    margin-right: 30px;
}
.main-title img {
    max-width: 500px;
    height: auto;
    margin: 0;
}
/* --- side-menu（ハンバーガーメニュー） --- */
.side-menu {
    position: fixed !important;
    top: 0;
    right: 0;
    left: auto;
    width: 240px;
    height: 100vh;
    height: 100dvh;
    background: #111;
    box-shadow: -2px 0 24px rgba(0,0,0,0.18);
    z-index: 99999 !important;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    padding: 32px 18px 60px 18px;
    backdrop-filter: blur(2px);
    overflow-y: auto;
    overflow-x: hidden;
}
.side-menu.open {
    transform: translateX(0);
}
.side-menu .close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.side-menu .close:hover {
    color: #ddd;
}
.side-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 0 0;
    color: #ddd;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.18em;
    border-radius: 8px;
    padding: 12px 0 12px 14px;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    position: relative;
}
.side-menu a:hover {
    background: #222;
    color: #fff;
    transform: translateX(-6px) scale(1.04);
    box-shadow: 0 2px 12px rgba(255,255,255,0.08);
}

/* アイコン用のクラス */
.side-menu .menu-icon {
    font-size: 1.2em;
    margin-right: 8px;
    color: #fff;
    transition: color 0.3s;
}
.side-menu a:hover .menu-icon {
    color: #fff;
}

/* --- footer --- */
.footer {
    background: #111;
    color: #aaa;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 1rem 0;
}

/* メニューボタンを画面右下に固定 */
button#modalBtn {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100000;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    cursor: pointer;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #000 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

button#modalBtn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.07);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    color: #000 !important;
}

/* テキストグループのスタイル */
.main-line {
    /* テキスト部分が画像に比べて広がりすぎないように最大幅を設定しても良い */
    max-width: 500px;
    text-align:center; /* テキストを左揃えにする (main-titleでtext-align: center;が指定されているため、ここで上書き) */
}

/* 画像サイズをレスポンシブに調整 */
.main-title img {
    max-width: 500px; /* 画像の最大幅を調整 */
    height: auto;
/*     margin: 0 auto; はdisplay: flex; を使う場合は不要です */
        z-index: 0;
}

/* 既存のh1スタイルは維持 */
.main-title h1 {
    font-family: 'M PLUS Rounded 1c', "Hiragino Maru Gothic ProN", sans-serif;
    margin-top: 0;      /* h1の上のマージンをなくす */
    /* margin-bottom: 0.5em; タイトルと文章の間に少しスペースを空ける */
    display: flex;             /* 子要素をFlexコンテナにする */
    justify-content: center;   /* 水平方向の中央揃え */
    align-items: center; 
}

/* すべてのページに共通させるスタイルシート */
body{
    font-family: nimbus-sans, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    /* background-color: dimgray; */
    background: #f5f5f5;
    position: relative;
    z-index: 0;
}
/* 共通：画像の基本スタイル */
.group figure img, .fzgroup figure img, .profile-content img, .social-icon {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
/* グループ画像の基本スタイル */
img{
    max-width: 100%;
    height: auto;
    display: flex;
    margin: 20px;
}

/* 共通：ボタンの基本スタイル */
.btn, .btn-umemiyu, .btn-artisthome {
    /* テキストを常に中央にするため inline-flex を使用 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    border-radius: 999px;
    height: 40px;
    line-height: 40px;
    min-width: 180px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-position 0.5s ease, filter 0.2s ease;

    /* 擬似要素を外に出すためのベース */
    position: relative;
}

/* callページのcallテキストの基本スタイル */
.p1{
    color: #111;
}
.call-p{
    color: #333;
}

.btn {
    background: linear-gradient(90deg, #555, #111, #555);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: #fff;
}
.btn-umemiyu {
    background: linear-gradient(90deg, #555, #333, #555);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: #fff;
    /* 中央寄せのため inline-flex と左右均等パディングにする */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    position: relative;
}
.btn-artisthome {
    background: linear-gradient(90deg, #555, #222, #555);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: #fff;
    /* 中央寄せのため inline-flex と左右均等パディングにする */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    position: relative;
}
.btn:hover, .btn-umemiyu:hover, .btn-artisthome:hover {
    background-position: 0% 0;
    filter: brightness(1.4);
    color: #fff;
}
.btn:active, .btn-umemiyu:active, .btn-artisthome:active {
    transform: scale(0.98);
    filter: brightness(0.8);
}

/* ボタン右外に伸びるライン＋矢印（cs.css と同じ挙動） */
.btn::after,
.btn-umemiyu::after,
.btn-artisthome::after{
    content: "";
    position: absolute;
    top: 50%;
    left: 100%; /* ボタンの右端外側に開始位置を設定 */
    transform: translateY(-50%) translateX(8px); /* ボタンと矢印の隙間 */
    height: 2px;
    width: 0; /* ホバーで幅を伸ばす（右方向） */
    /* ほんの少し透けた黒 */
    background: rgba(0,0,0,0.75);
    /* 軽い影で矢印を浮かせる */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
    will-change: width, transform;
    transition: width 220ms ease;
    pointer-events: none;
}

.btn::before,
.btn-umemiyu::before,
.btn-artisthome::before{
    /* 矢印の頭（三角） */
    content: "";
    position: absolute;
    top: 50%;
    /* ラインの終端（ボタン右端 + gap + line-length）に置く */
    left: calc(100% + 8px + 14px);
    transform: translateY(-50%) translateX(-6px);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid rgba(0,0,0,0.75);
    /* 三角にも影を付ける */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
    will-change: transform, opacity;
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
    pointer-events: none;
}

.btn:hover::after,
.btn-umemiyu:hover::after,
.btn-artisthome:hover::after{
    width: 14px; /* ラインが右に伸びる長さ */
}

.btn:hover::before,
.btn-umemiyu:hover::before,
.btn-artisthome:hover::before{
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .btn::after, .btn-umemiyu::after, .btn-artisthome::after,
    .btn::before, .btn-umemiyu::before, .btn-artisthome::before {
        transition: none !important;
    }
}
/* footer */
.footer{
    /* position: static; デフォルト */
    background: #111;
    color: #aaa;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 1rem 0;
}

/* indexページのみfooterにアニメーション */
body.index-page .footer {
    transition: opacity 2000ms ease;
}
}
.footer p{
    margin: 0;
    color: #aaa;
}
.social-icons{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
}
.social-icon{
    width: 80px;
    height: auto;
    display: inline-block;
}
/* 共通：flexレイアウトの基本（profile-content, group, fzgroup） */
.profile-content, .group, .fzgroup {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 auto;
}
.profile-content {
    max-width: 1000px;
    align-items: flex-start;
}
.profile-text {
    flex: 1 1 0;
    min-width: 200px;
    text-align: left;
}
.profile-image {
    flex: 0 0 420px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
/* 共通：h1メンバー名 */
.h1-member_name{
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* group */
.group{
    /* text-align: center;  */
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;

    max-width: 1200px;
    margin: 0 auto;
    z-index: 0;
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
}

/* indexページのみ：フェードインのみ */
body.index-page .group {
    animation: none;
    opacity: 1;
    transition: opacity 2000ms ease;
}

.group figure{
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0;
    padding: 10px;

    width: calc((100% - 40px) / 3);
    box-sizing: border-box;
    min-width: 320px;
}

/* indexページのみfigureにフェードイン */
body.index-page .group figure {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease-in-out, opacity 2000ms ease;
}

.group figure:nth-child(n+4) {
    width: calc((100% - 40px) / 3);
    max-width: 370px;
}

.group figure img{
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 100%;
    height: auto;
    display: block;
}

.group figure img:hover{
    transform: scale(1.08) rotate(1deg); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.group img{
    /* width: 300px;  */
    height: auto;
}

/* fzgroup */
.fzgroup{
    display: flex;             
    justify-content: center;   
    gap: 15px;                
    flex-wrap: wrap;           
    align-items: flex-start;
    max-width: 1250px;
    margin: 0 auto;
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
}

.fzgroup figure{
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    width: calc( (100% - 45px) / 4 ); 
    min-width: 290px;
}

/* indexページのみfzgroup figureにフェードイン */
body.index-page .fzgroup figure {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, opacity 2000ms ease;
}

.fzgroup figure img{
    max-width: 100%;
}

.fzgroup figure:hover{
    transform: translateY(-5px); 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.fzgroup figure figcaption {
    margin-top: 10px;
    font-size: 1.25em;
    color: #333;
}

/* button */
.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 .9rem;
    border-radius: 999px;
    height: 40px;
    line-height: 40px;
    min-width: 180px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;

    background: linear-gradient(90deg, #555, #111, #555);
    background-size: 200% 100%;
    background-position: 100% 0;
    
    color: #fff;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    
    transition: background-position 0.5s ease, filter 0.2s ease;
}

.btn:hover{
    background-position: 0% 0;
    filter: brightness(1.4);
    color: #fff;
}

.btn:active{
    transform: scale(0.98);
    filter: brightness(0.8);
}

/* 画面幅が1250px以下の場合 (3枚連ねたい) */
@media (max-width: 1250px) {
    .fzgroup figure {
        /* 3枚連ねるための幅 */
        width: calc( (100% - 30px) / 3 ); 
    }
}

/* 画面幅が850px以下の場合 (2枚連ねたい) */
@media (max-width: 850px) {
    .fzgroup figure {
        /* 2枚連ねるための幅 */
        width: calc( (100% - 15px) / 2 );
    }
}

/* 画面幅が500px以下の場合 (1枚連ねたい) */
@media (max-width: 500px) {
    .fzgroup figure {
        /* 1枚並ぶための幅 */
        width: 100%; 
    }
}

@media (max-width: 650px) {
    .group figure {
        /* 1枚並ぶための幅 */
        width: 100% !important; 
        min-width: auto; /* 最小幅の制約を解除し、画面幅全体に広げる */
        max-width: none !important; /* 最大幅の制約も解除 */
    }
}

/* 画面幅が狭い場合の対応 (例: 縦並びにする) */
@media (max-width: 768px) {
    .main-title {
        flex-direction: column; /* 縦並びにする */
        gap: 20px;
        /* MENUボタン分の右余白を確保してかぶりを防止 */
        padding-right: 110px;
    }
    .main-line {
        text-align: right; /* 縦並びになったらテキストを中央揃えに戻す */
    }
    .main-title img {
        /* スマホ画面に合わせて最大幅を調整 */
        max-width: 300px; /* 例: 200ピクセルに制限 */
    }
    /* タイトル (h1) の文字を小さくする */
    .main-title h1 {
        font-size: 1.6rem;
    }

    /* 文章 (p) の文字を小さくする */
    .main-line p {
        font-size: 0.9em; 
    }
    
    /* ボタン (.btn) の文字を小さくする (必要に応じて) */
    .btn {
        font-size: 14px; 
    }

    /* スマホ: MENUボタンを小さくしてかぶりを防止 */
    button#modalBtn {
        top: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 14px;
    }

    /* スマホ: イントロタイトルをMENUボタンとかぶらないよう調整 */
    #intro-title.zoom-out {
        position: fixed;
        font-size: clamp(0.7rem, 3.5vw, 0.95rem);
        top: 18px;
        left: 15px;
        max-width: calc(100vw - 120px);
        white-space: normal;
        overflow: visible;
    }
}

/* 1. アニメーションキーフレームの定義 */
@keyframes fadeIn {
    from {
    opacity: 0;         /* 開始時: 透明度0 (完全に透明) */
    transform: translateY(20px); /* オプション: 下から少し浮き上がる動きを追加 */
    }
    to {
    opacity: 1;         /* 終了時: 透明度1 (完全に不透明) */
    transform: translateY(0);
    }
}

/* 2. .main-title へのアニメーションの適用 */
.main-title {
    background: #111; /* 白黒シンプルデザイン */
    color: #fff;
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0; /* アニメーション開始まで要素を非表示にしておく（フェードインの瞬間まで見えないようにする） */
}

p {
    /* 長い英単語や記号が連続する場合に、途中で強制的に改行を挿入できるようにする */
    word-break: break-word;
    
    /* 画面端に近すぎないように左右に余白を設定する */
    padding-left: 10px;
    padding-right: 10px;
}

/* モーダルの背景 */

/* モーダル背景 */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 30, 40, 0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* モーダル本体 */
.modal-content {
        background: #fff;
        border-radius: 18px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.18);
        padding: 32px 28px 24px 28px;
        min-width: 260px;
        max-width: 90vw;
        min-height: 120px;
        text-align: center;
        position: relative;
        border: none;
        animation: modalIn 0.25s cubic-bezier(.4,2,.6,1) both;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
}

/* コール集ボタンを中央揃えにする */
.call-btn {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

/* indexページのみcall-btnにアニメーション */
body.index-page .call-btn {
    transition: opacity 2000ms ease;
}

@keyframes modalIn {
  0% { opacity: 0; transform: translateY(-30px) scale(0.95); }
  100% { opacity: 1; transform: none; }
}

.modal-content a {
    display: block;
    margin: 18px auto 0 auto;
    color: #111;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.15em;
    border-radius: 8px;
    padding: 8px 0;
    transition: background 0.2s, color 0.2s;
}
.modal-content a:hover {
    background: #f0f0f0;
    color: #111;
}

.modal-content .close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-content .close:hover {
    color: #333;
}

/* ===== イントロオーバーレイ ===== */

/* ヘッダーを非表示 */
.main-title {
    display: none;
}

/* index ページ: フェードインアニメーションを無効化、イントロ中は非表示 */
body.index-page .main-title,
body.index-page .group,
body.index-page .fzgroup,
body.index-page .call-btn,
body.index-page .footer {
    animation: none;
}

/* イントロ表示中: コンテンツを完全に非表示 */
body.index-page.intro-active .main-title,
body.index-page.intro-active .group,
body.index-page.intro-active .fzgroup,
body.index-page.intro-active .call-btn,
body.index-page.intro-active .footer {
    opacity: 0;
    pointer-events: none;
}

/* イントロ表示中: figureも透明 */
body.index-page.intro-active .group figure,
body.index-page.intro-active .fzgroup figure {
    opacity: 0;
}

/* イントロ終了後の初期状態：透明 */
body.index-page:not(.intro-active) .group,
body.index-page:not(.intro-active) .call-btn,
body.index-page:not(.intro-active) .footer {
    opacity: 0;
}

/* figure要素は初期状態で透明 */
body.index-page:not(.intro-active) .group figure,
body.index-page:not(.intro-active) .fzgroup figure {
    opacity: 0;
}

/* フェードインアニメーション */
body.index-page .group.slide-in,
body.index-page .call-btn.slide-in,
body.index-page .footer.slide-in {
    opacity: 1;
}

/* figureはフェードインのみ */
body.index-page .group figure.slide-in,
body.index-page .fzgroup figure.slide-in {
    opacity: 1;
}

/* イントロアニメーション: コンテンツが下から引っ張り上げられる */
body.index-page:not(.intro-active) .main-title {
    animation: pullUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pullUp {
    from {
        transform: translateY(30px);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    animation: introFadeIn 0.7s ease forwards;
}

@keyframes introFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#intro-title {
    color: #fff;
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: clamp(2rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0;
    text-align: center;
    user-select: none;
    text-decoration: none;
    display: block;
    /* fzgroupと同じフェードインエフェクト */
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
    transition: all 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

#intro-title.zoom-out {
    position: absolute;
    top: 15px;
    left: 30px;
    font-size: 1.5rem;
    transform: translateY(0);
    z-index: 10000000;
    color: #000;
    cursor: pointer;
}

#intro-title.zoom-out:hover {
    opacity: 0.7;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(40vh);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* アクセシビリティ: モーション低減時はアニメーションなしで即非表示 */
@media (prefers-reduced-motion: reduce) {
    #intro-overlay {
        display: none;
    }
}

/* 背景画像フローアニメーション */
.bg-flow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: flex;
    gap: 30px;
    padding: 0 20px;
    overflow: hidden;
    pointer-events: none;
}

.bg-flow-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 50px;
    animation: slideDown linear infinite;
}

.bg-flow-item {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.bg-flow-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    opacity: 0.35;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(33.333%);
    }
}

/* レスポンシブ: 小さい画面では列を減らす */
@media (max-width: 768px) {
    .bg-flow-container {
        gap: 15px;
        padding: 0 10px;
    }
    
    .bg-flow-column {
        gap: 25px;
    }
    
    .bg-flow-column-3 {
        display: none;
    }
    
    .bg-flow-item {
        height: 200px;
    }
}

/* さらに小さい画面では1列のみ */
@media (max-width: 480px) {
    .bg-flow-container {
        gap: 10px;
        padding: 0 5px;
    }
    
    .bg-flow-column-2 {
        display: none;
    }
    
    .bg-flow-item {
        height: 180px;
    }
}

