/* メインスタイル */

body {
    font-family: "m-plus-rounded-2p", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-weight: 500;
    line-height: 1.6;
    color: #333;
    background-color: #000; /* 必要に応じて調整 */
    background-image: url('../assets/images/intoro/bg_intoro.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* 音声設定画面 */
.audio-settings-container {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* 背景パターン（七宝繋ぎ風）のオーバーレイ - 今回は画像に含まれているようなので削除または調整 */
.audio-settings-container::before {
    display: none;
}

/* 雲の装飾要素 */
.cloud-decoration {
    position: fixed;
    z-index: 5;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.cloud-decoration.hidden {
    opacity: 0;
    pointer-events: none;
}

.cloud-1 {
    top: 5%;
    left: -20%; /* 画面外から開始 */
    width: 280px;
    height: 120px;
    animation: moveCloudLeft 60s linear infinite;
}

.cloud-2 {
    bottom: 10%;
    right: -20%; /* 画面外から開始 */
    width: 320px;
    height: 140px;
    transform: scaleX(-1); /* 画像を反転 */
    animation: moveCloudRight 80s linear infinite;
}

.audio-settings-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
    margin-top: -100px;
}

.audio-settings-title {
    font-family: "momochidori", sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: #000;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.audio-settings-note {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 50px;
    opacity: 0.9;
}

/* 音声ON/OFFボタン */
.audio-toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
}

.audio-toggle-button {
    width: 130px; /* 画像のサイズを大きく調整 */
    height: 130px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.audio-toggle-button:hover {
    transform: scale(1.05);
}

.audio-toggle-button:active {
    transform: scale(0.96);
}

.audio-toggle-button img {
    width: 100%;
    height: auto;
    display: block;
}

.audio-toggle-button.active {
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
}

.button-icon {
    display: block;
    width: 100%;
}

@keyframes moveCloudLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(120vw); }
}

@keyframes moveCloudRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(-120vw); }
}

/* ヘッダーのサウンドアイコン */
.header-sound-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* サウンドボタンアイコン */
.sound-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.speaker-icon {
    display: none; /* SVGアイコンを非表示にする */
}

.button-icon {
    display: block;
    width: 100%;
}

.sound-icon {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.button-label {
    display: none;
}

/* 背景レイヤー用のオーバーレイ */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
}

body.night-street-bg {
    background-image: url('../assets/images/intoro/bg_common_02.jpg');
    background-color: #1a1a1a;
}

body.intro-bg-01 {
    background-image: url('../assets/images/intoro/bg_common_01.jpg');
    background-color: #1a1a1a;
}

body.intro-bg-02 {
    background-image: url('../assets/images/intoro/bg_common_01.jpg'); /* 01を後ろに残す */
    background-color: #1a1a1a;
}

body.intro-bg-02::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/intoro/bg_common_02.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

body.intro-bg-02::after {
    opacity: 1;
}

body.night-street-bg::before,
body.intro-bg-01::before,
body.intro-bg-02::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
    pointer-events: none;
    transition: opacity 1.0s ease-in-out;
    opacity: 1;
}

body.no-overlay::before {
    opacity: 0;
}

/* ヘッダー */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    pointer-events: none;
}

.page-header.behind-overlay {
    z-index: 5;
}

.header-left, .header-right {
    pointer-events: auto;
}

.header-audio-button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    padding: 0px;
    transition: opacity 0.3s;
}

.header-audio-button:hover {
    opacity: 0.8;
}

.header-audio-icon {
    width: 100%;
}

.header-audio-label {
    font-size: 0.7rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.header-menu-button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.header-menu-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 導入画面 */
.intro-container {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0px 20px 20px;
    position: relative;
    z-index: 10;
}

.intro-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
    margin: 0 auto;
}

.intro-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.8s ease-in-out;
}

/* 導入画面の挨拶 */
.intro-title {
    font-family: "momochidori", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 50px;
    line-height: 1.7;
    text-align: center;
}

.intro-character-container {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

    .intro-character {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* メッセージボード */
.welcome-message-container {
    width: 95%;
    max-width: 420px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 20;
    animation: fadeIn 1s ease-in-out;
}

.welcome-board-img {
    width: 100%;
    height: auto;
    display: block;
}

.peek-inside-button {
    background-image: url('../assets/images/intoro/btn_into.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
    width: 220px;
    height: 80px;
    cursor: pointer;
    margin: -150px auto 0; /* 画像の上に少し重ねるように配置 */
    display: block;
    transition: transform 0.2s;
    position: relative;
    z-index: 21;
}

.peek-inside-button:hover {
    transform: scale(1.03);
}

.peek-inside-button:active {
    transform: scale(0.97);
}

/* 終了ボード (一本締め) */
.last-board-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
}

.last-board-container {
    width: 95%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    animation: fadeIn 1s ease-in-out;
}

.last-board-img {
    width: 100%;
    height: auto;
    display: block;
}

.ipponjime-button {
    background-image: url('../assets/images/menu/btn_last.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
    width: 220px;
    height: 80px;
    cursor: pointer;
    display: block;
    transition: transform 0.2s;
    position: relative;
    z-index: 1001;
    margin: -130px auto 0;
}

.ipponjime-button:hover {
    transform: scale(1.03);
}

.ipponjime-button:active {
    transform: scale(0.97);
}

/* 下部ダイアログ */
.dialogue-progression-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: transparent;
    z-index: 100;
    cursor: pointer;
}

.bottom-dialogue-box {
    width: 100%;
    height: 180px;
    max-width: 620px;
    margin: 0 auto 40px;
    background-color: #fff;
    border: 3px solid #000;
    border-radius: 18px;
    padding: 40px 30px 30px;
    position: relative;
    z-index: 5; /* カバー画像の上に表示 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.bottom-dialogue-box::before {
    content: 'あなた';
    position: absolute;
    top: -22px;
    left: 25px;
    width: 100px;
    height: 38px;
    background-color: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.dialogue-box-content {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.8;
    color: #000;
    text-align: left;
    min-height: 60px;
}

.dialogue-box-content p {
    margin: 0;
}

.next-indicator {
    position: absolute;
    bottom: 15px;
    right: 25px;
    width: 28px;
    height: 28px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* イントロ内メニュー・メニュー画面 */
.intro-menu-section,
.menu-selection-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px 40px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7);
}

.intro-menu-content,
.menu-selection-content {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.menu-title-box {
    background-color: #fff;
    border: none;
    border-radius: 20px;
    padding: 18px 45px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.menu-title-box h2 {
    font-family: "momochidori", sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #000;
    margin: 0;
    letter-spacing: 0.1em;
}

.stall-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 420px;
}

.stall-card {
    width: 100%;
    aspect-ratio: 165/240;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    border: none;
    position: relative;
    background-color: transparent;
    text-decoration: none;
    display: block;
}

.stall-card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stall-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stall-card:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.stall-card:active {
    transform: scale(0.97);
}

.menu-footer-note {
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    line-height: 1.7;
    margin-top: 10px;
}

.menu-footer-note p {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
}

/* メニュー画面 */
.menu-container {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.menu-content {
    max-width: 1200px;
    width: 100%;
}

.menu-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
}

.department-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.department-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.department-card-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
}

.department-card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.department-card-button {
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.department-card-button:hover {
    background-color: #0056b3;
}

.menu-navigation {
    text-align: center;
}

/* 部署紹介画面 (New) */
.department-container {
    width: 100%;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

.department-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.department-bg-layer.active {
    opacity: 1;
}

.department-bg-layer.blurred {
    filter: blur(8px) brightness(0.6);
}

/* キャラクター */
.department-characters {
    position: absolute;
    bottom: -10px; /* 位置を少し上に調整 */
    left: 0;
    width: 100%;
    height: 95vh;
    z-index: 1;
    pointer-events: none;
    overflow: visible; /* はみ出しを許可 */
}

.department-characters img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: 100%;
    max-width: 620px;
    object-fit: contain; /* 縦横比維持で全体を表示 */
}

/* メインコンテンツエリア */
.department-content {
    position: relative;
    z-index: 300;        
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 中央オーバーレイエリア */
.center-overlay-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start; /* 上端合わせにしてスクロール可能にする */
    justify-content: center;
    padding: 0px;
    margin: 0px;
    overflow-y: auto; /* 縦スクロールを明示 */
    pointer-events: none; /* コンテンツ以外は透過 */
    z-index: 200; /* メニューセクション(10)より上 */
}

/* オーバーレイ背景（黒アルファ） */
.center-overlay-area.overlay-active{
    pointer-events: auto;
}
.center-overlay-area.overlay-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 101; /* center-overlay-areaのベースより上 */
    pointer-events: auto; /* クリックを受け取る */
}

.overlay-content {
    position: relative;
    pointer-events: auto;
    width: 100%;
    max-width: 400px;
    margin-top: auto;
    margin-bottom: auto;
    animation: fadeIn 0.5s ease-out;
    z-index: 102; /* 黒アルファ(101)より上 */
}

/* 部署紹介 */

#intro-display,
#visited-info-display{
    margin-top: auto;
    margin-bottom: auto;
    padding: 5px 0 5px;
    width: 85%;
}
.intro-image-container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.intro-image-container img {
    width: 100%;
    height: auto;
    /* box-shadow: 0 5px 15px rgba(0,0,0,0.3); */ /* 画像自体に枠がある場合は不要 */
}

/* 選択肢 */
.selection-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    /* padding: 0 20px; */
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.selection-container.horizontal {
    flex-direction: row;
    justify-content: center;
    gap: 4px;
}

.selection-btn {
    background-color: #E42542; /* 赤色 */
    color: white;
    border: 3px solid #000;
    border-radius: 12px;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    width: 100%;
}

.selection-btn.image-btn {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    width: auto;
}

.selection-btn.image-btn img {
    height: 91px;
    width: auto;
    display: block;
}

.selection-btn:active {
    transform: scale(0.98);
}

.selection-btn:not(.image-btn):active {
    background-color: #d63c4b;
}

/* 担当者カード */
.staff-card-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* 右寄せ */
    padding-right: 10px;
    position: absolute;
    right: 10px;
    top: 70%; /* 画面中央付近 */
    transform: translateY(-50%);
    max-width: 300px;
}

.staff-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 4px solid #333;
    width: 200px; /* 幅を小さく */
    position: relative;
}

/* 吹き出しのしっぽ（左側に出す） */
.staff-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #333;
    transform: translateY(-50%);
}

.staff-card-header h3 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 6px;
}

.staff-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.staff-image-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #eee;
}

.staff-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-description {
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
    font-weight: bold;
}

/* 繋がるアクション */
.connect-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 40px;
}

.action-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: opacity 0.2s;
}

.action-button:hover {
    opacity: 0.9;
}

.action-button .icon {
    margin-left: 10px;
    font-weight: normal;
}

.action-button.facebook {
    background-color: #ee4d5d;
}

.action-button.mail {
    background-color: #ee4d5d;
}

.action-button.exit {
    background-color: #000;
    color: white;
}

/* 下部会話エリア */
    .department-cover {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 180px; /* 画像の高さに合わせて調整 */
        background-size: auto 100%;
        background-position: center bottom;
        background-repeat: repeat-x;
        z-index: 3; /* ダイアログエリア(z-index: 4)の背景として機能 */
        pointer-events: none;
    }

    .dialogue-area {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 20px 15px 30px; /* 下部に余白を持たせてカバー画像が見えるように */
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        z-index: 4;
        pointer-events: none; /* 下の要素を触れるように */
    }

    .dialogue-box {
        background-color: #fff;
        border: 3px solid #000;
        border-radius: 18px;
        padding: 25px 25px 20px;
        width: 100%;
        max-width: 620px;
        min-height: 180px;
        position: relative;
        z-index: 5;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        display: flex;
        flex-direction: column;
        gap: 10px;
        /* justify-content: center; */
        pointer-events: auto; /* ダイアログ自体はクリックを受け取る */
    }

    .speaker-label {
        position: absolute;
        top: -22px; /* ダイアログボックスの上に配置 */
        left: 25px;
        width: 140px; /* intro.htmlに合わせる */
        height: 38px; /* intro.htmlに合わせる */
        background-color: #000; /* 黒い角丸の帯 */
        border-radius: 12px; /* 角丸 */
        display: flex; /* 中央寄せ用 */
        align-items: center; /* 中央寄せ用 */
        justify-content: center; /* 中央寄せ用 */
        color: #fff;
        font-size: 1.2rem;
        font-weight: bold;
        letter-spacing: 0.1em; /* intro.htmlに合わせる */
        white-space: nowrap; /* テキストが改行されないように */
    }

.dialogue-text {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.6;
    font-weight: 500;
    width: 100%;
    height: auto; /* autoに変更 */
    z-index: 2;
    /* display: flex;
    align-items: flex-end; */
    /* justify-content: center; */
    pointer-events: none;
}


.global-menu-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 200;
}

.back-to-menu-button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: auto;
    height: auto;
}

.back-to-menu-button img {
    height: 55px; /* 他のボタン画像とサイズを合わせる */
    width: auto;
    display: block;
}

.back-to-menu-button:hover {
    transform: scale(1.05);
}

.back-to-menu-button:active {
    transform: scale(0.95);
}

.close-menu-button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    transition: transform 0.2s ease;
}

.close-menu-button:hover {
    transform: scale(1.1);
}

.close-menu-button:active {
    transform: scale(0.95);
}

.close-menu-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.global-menu-container {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px 40px;
}

.global-menu-content {
    max-width: 450px;
    width: 100%;
    background-color: #fff;
    border-radius: 30px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    padding: 10px;
    border: solid #000 2px;
}

/* 吹き出しの三角形（左上） */
.global-menu-content::before {
    content: none;
}

.global-menu-title-banner {
    background-color: #000;
    padding: 10px;
    text-align: center;
    margin: 0 auto 6px;
    border-radius: 22px;
    display: block;
    max-width: 290px;
}

.global-menu-title-banner h1 {
    font-family: "momochidori", sans-serif;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.15em;
}

.global-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.global-menu-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 16px;
    row-gap: 8px;
    padding: 12px 22px;
    background-color: #fff;
    transition: background-color 0.2s ease;
    position: relative; /* オーバーレイ用 */
}

.global-menu-item.locked {
    pointer-events: none; /* リンクを押せなくする */
    margin: 5px;
}

.global-menu-item.locked::after {
    content: '';
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: rgba(0, 0, 0, 0.4); /* グレーのアルファ */
    z-index: 1;
    border-radius: 20px;
}

.global-menu-item.locked .lock-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 40px;
    height: auto;
    display: block;
}

.global-menu-item.locked img:not(.lock-icon-overlay) {
    filter: grayscale(1); /* 中身をグレースケールに（任意） */
}

.global-menu-item-visited {
    background-color: #fff;
}

.global-menu-divider {
    height: 1px;
    background-color: #000;
    margin: 0 25px;
}

.menu-item-icon {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    grid-row: 1 / 3;
}

.menu-item-title {
    font-family: "momochidori", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #000;
    margin: 0;
    min-width: 140px;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
}

.menu-item-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    grid-column: 2;
    grid-row: 2;
}

.menu-item-button {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.menu-item-button img {
    display: block;
    width: 110px;
    height: auto;
}

.menu-item-button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.menu-item-button:active {
    transform: scale(0.97);
}

.global-menu-footer {
    width:320px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-self: center;
    margin: 20px auto 0;
}

.footer-button {
    display: block;
    background-color: #fff;
    border: 3px solid #000;
    border-radius: 50px;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.footer-button:hover {
    background-color: #f5f5f5;
    transform: scale(1.02);
}

.footer-button:active {
    transform: scale(0.98);
}

.global-menu-navigation {
    text-align: center;
}

.next-cursor {
    position: absolute;
    bottom: 10px;
    right: 15px;
    animation: bounce 1s infinite;
    font-size: 0.8rem;
    color: #333;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

/* UNLOCKポップアップ */
.unlock-container {
    width: 90%;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}


.unlock-container img{
    width: 100%;
    height: auto;
}

#btn-unlock-close {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.1s;
    position: absolute;
    bottom: 40px; /* 画像内のボタン位置に合わせる調整が必要かもしれません */
}

#btn-unlock-close:active {
    transform: scale(0.95);
}

#btn-unlock-close img {
    height: 55px;
    width: auto;
    display: block;
}

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

/* 初期暗転オーバーレイ */
.initial-dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1); /* 完全な黒 */
    z-index: 2000; /* 他の要素の上に表示 */
    opacity: 1;
    transition: opacity 1s ease-out; /* フェードアウト効果 */
    pointer-events: none; /* クリックを透過させる */
}

.initial-dark-overlay.fade-out {
    opacity: 0;
}

/* キャラクターのフェードイン効果 */
.fade-out-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
}

.fade-out-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.department-characters img.fade-in-character {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.department-characters img.fade-in-character.active {
    opacity: 1;
}

/* ナビゲーションボタン */
.nav-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* 全体メニュー画面 */

/* 一本締めアニメーション */
.ipponjime-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.ipponjime-animation-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ippon-hand-animation {
    opacity: 0;
    transition: opacity 0.2s;

    width: 320px;
    height: 320px;
    background-image: url('../assets/images/menu/ippon.png');
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: 0 0;
}


img.smartphone-animation-icon{
    position: absolute;
    transform: translateX(-50%);
    width: 60px;
    height: auto;
    object-fit: contain;
}

#smartphone-animation-info{
    bottom: 15%;
    right: -22px;
}

.stall-card-smartphone-icon{
    right: -20px;
    bottom: 80px;
}