/**
 * s_page.css（GREE版）
 *
 * GREEプラットフォーム向けWebアプリの共通ページスタイル。
 * フォント・グローバルレイアウト・ヘッダー/フッター・スクロール領域・
 * GREE iframe 連携用のラッパー指定・ショップ画面専用スタイルなどを定義する。
 * 配信先: gree.ai-sand.com（DocumentRoot: public/www/gree）
 */
/* ========== フォント定義（Tanugo / TanugoRound） ========== */
/* Tanugoフォントの定義 たぬ語*/
@font-face {
    font-family: 'Tanugo';
    src: url('../font/Tanugo-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Tanugo';
    src: url('../font/Tanugo-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Tanugo';
    src: url('../font/Tanugo-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Tanugo';
    src: url('../font/Tanugo-ExtraLight.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'TanugoRound';
    src: url('../font/Tanugo-Round-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'TanugoRound';
    src: url('../font/Tanugo-Round-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'TanugoRound';
    src: url('../font/Tanugo-Round-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
/* すべてのボタン要素にTanugoフォントを適用 */
button {
    font-family: 'Tanugo', Arial, sans-serif;
}

/* ========== ダイアログ・ドラッグ ========== */
/* ダイアログドラッグ用（confirm/alert のヘッダーでドラッグ可能） */
.dialog-drag-handle-area {
    cursor: move;
    -webkit-user-select: none;
    user-select: none;
}

/* ========== グローバル（html / body） ========== */
/* 画面全体の基準スタイル。body はスクロールさせず、中身は .page-scroll でスクロール */
html, body {
    margin: 0;
    padding: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Tanugo', Arial, sans-serif;
    /* タッチ操作：テキスト選択・コールアウトは無効。スクロールは内側コンテナで行うため touch-action は無効化 */
    /* touch-action: none; */  /* ← UIページでは無効化（内側コンテナでスクロール） */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* 全体スクロール防止（ヘッダー固定のため、body自体はスクロールさせない） */
    overflow: hidden;
    /* iPhoneのノッチ対応 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* ========== GREE ラッパー用（gree.js 読み込み時に body に付与される .gree-app-wrapped） ========== */
/* フッター付近で body の黒背景が見えないよう、GREE 埋め込み時は背景を透明にする */
html.gree-app-wrapped,
body.gree-app-wrapped {
    background: transparent !important;
}

/* gree.js 読み込み時: body を縦並びにし、アプリを上・GREEのUIをフッター（下）に配置（レスポンシブ） */
body.gree-app-wrapped,
html.gree-app-wrapped body {
    position: relative !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}
html.gree-app-wrapped {
    overflow: hidden !important;
}

/* gree.js 読み込み時: アプリ領域。コンテンツは上でスクロール、GREEはコンテンツ外で下に固定 */
#gree-app-container {
    flex: 1 !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    /* 初期値。gree_ui.js が実測で上書きし、GREEフッターと隙間なく揃える */
    --gree-footer-area: 72px;
    --gree-footer-reveal-offset: 0px;
    /* --gree-toggle-bar-height: clamp(20px, 5vmin, 44px); 画面サイズに応じたスケーリング（元） */
    /* トグルバーの高さ（最低16px） */
    --gree-toggle-bar-height: 16px;
    --app-footer-height: clamp(60px, 13vh, 82px);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    background: #000 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    font-family: 'Tanugo', Arial, sans-serif !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* コンテンツ領域。GREE版では .main-layout はスクロールさせず、.page-scroll のみスクロール（ヘッダー固定） */
/* アプリのフッターバー（.footer-buttons）の高さの 2/3 だけ予約。1/3 はコンテンツがフッター裏に重なって表示される */
#gree-app-container > .main-layout {
    order: -1 !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    padding-bottom: calc(var(--app-footer-height) * 2 / 3) !important;
    position: relative !important;
    z-index: 1 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

/* GREE版ホーム等: .game-container をビューポート高に合わせ、内側で .page-scroll のみスクロール */
body.gree-app-wrapped #gree-app-container .game-container {
    height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    align-self: stretch !important;
}
/* canvas は背面に固定 */
body.gree-app-wrapped #gree-app-container .game-container > #game {
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 0 !important;
}
/* ヘッダーは絶対配置で上に重ね表示。z-index はコンテンツ(3)より前面・ページ遷移オーバーレイより背面にする */
body.gree-app-wrapped #gree-app-container .game-container .page-header {
    position: absolute !important;
    top: 10px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
}
/* 狭い画面（PRA-LX2 等 360px 幅）：ヘッダーが scale で縮小するため、ホームの上余白を詰めつつほんの少し余白を残す */
@media (max-width: 420px) {
    body.gree-app-wrapped.page-home #gree-app-container .game-container .page-scroll .page-scroll-inner {
        padding-top: calc(65px + env(safe-area-inset-top, 0px)) !important;
    }
}
/* .page-scroll でコンテンツ全体を表示。領域いっぱいに広げ、縦スクロールのみここで行う */
/* z-index はアプリフッター(.footer-outer)より低くし、フッターが常に前面に表示されるようにする */
body.gree-app-wrapped #gree-app-container .game-container .page-scroll {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
    z-index: 1 !important;
}
/* トップ画面は縦スクロール不要 */
body.gree-app-wrapped.page-vtop #gree-app-container > .main-layout {
    overflow-y: hidden !important;
}
body.gree-app-wrapped.page-vtop #gree-app-container .game-container .page-scroll {
    overflow-y: hidden !important;
}
/* ローディング画面も縦スクロール不要（トップ画面と同様） */
body.gree-app-wrapped.page-loading #gree-app-container > .main-layout {
    overflow-y: hidden !important;
}
body.gree-app-wrapped.page-loading #gree-app-container .game-container .page-scroll {
    overflow-y: hidden !important;
}
/* ローディング画面では背景画像を表示しない（v_loading.html 用） */
body.gree-app-wrapped.page-loading #gree-app-container > .main-layout {
    background-image: none;
}
body.gree-app-wrapped.page-loading #gree-app-container .game-container {
    background-image: none;
}
body.gree-app-wrapped.page-loading #gree-app-container .game-container::after {
    background-image: none;
}
/* オーバーレイはレイアウトから外し、.main-layout が常に全高を使えるようにする */
/* z-index はアプリフッター（最大 2147483646）より前面。pageTransition の白フェードが隠れないようにする */
body.gree-app-wrapped > #page-load-overlay,
body.gree-app-wrapped #gree-app-container > #page-load-overlay,
body.gree-app-wrapped #gree-app-container > #shop-purchase-blocking-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(100vw, 720px) !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    flex: none !important;
    max-height: none !important;
    order: 9999 !important;
    z-index: 2147483647 !important;
}

body.gree-app-wrapped > #page-load-overlay,
body.gree-app-wrapped #gree-app-container > #page-load-overlay {
    background: #fff !important;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    will-change: opacity;
    transition: opacity 0.08s ease-out, visibility 0s linear 0.08s;
}

body.gree-app-wrapped > #page-load-overlay.fade-out,
body.gree-app-wrapped #gree-app-container > #page-load-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

body.gree-app-wrapped > #page-load-overlay.fade-in-leave,
body.gree-app-wrapped #gree-app-container > #page-load-overlay.fade-in-leave {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.1s ease-out;
}

/* ページ遷移の白フェードを最前面に見せるため、競合する最上位UIは遷移中だけ退避する */
html.gree-app-wrapped.page-transition-active,
body.gree-app-wrapped.page-transition-active {
    background: #fff !important;
}

body.gree-app-wrapped.page-transition-active #shop-purchase-blocking-overlay,
body.gree-app-wrapped.page-transition-active #shop-1005-overlay,
body.gree-app-wrapped.page-transition-active #shop-1005-fallback,
body.gree-app-wrapped.page-transition-active #debug-panel-dialog,
body.gree-app-wrapped.page-transition-active #debug-panel-float-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
/* GREEフッターはコンテンツより下に固定。高さを制限しコンテンツ領域に食い込まないようにする */
/* PC では親が横幅100%のため、子が width:100% だとビューポート全幅に伸びる。.game-container（720px）に合わせて幅を制限する */
#gree-app-container > *:not(.main-layout) {
    order: 1 !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    max-height: clamp(72px, 16vh, 110px) !important;
    overflow: hidden !important;
    z-index: 0 !important;
    max-width: min(100%, 720px) !important;
    align-self: center !important;
}

/* GREE が body 直下に挿入する要素と、アプリの .footer-outer（gree_ui.js で body 直下へ移動）をレイアウトする。
 * :not(#id) が3つあり本セレクタの特異性が body > .footer-outer より高いため、ここで width:100% にすると
 * PC ブラウザでフッターがビューポート全幅に伸びて .game-container（最大720px）からはみ出す。
 * 幅は .game-container / .footer-outer と同じ min(100%, 720px) に統一し、列方向 flex の横方向は align-self で中央寄せする（DBGボタンは除外）。 */
body.gree-app-wrapped > *:not(#gree-app-container):not(#page-load-overlay):not(#debug-panel-float-btn):not(#debug-panel-dialog) {
    flex-shrink: 0 !important;
    width: min(100%, 720px) !important;
    max-width: 100vw !important;
    align-self: center !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* デバッグパネルで「GREEのUIを表示」がオフのとき: gree.js が挿入したUIを非表示にし、フッター領域を0にする。
 * .footer-outer は gree_ui.js で body 直下に移しているため、除外しないとアプリフッターまで隠れてしまう */
body.gree-app-wrapped.gree-ui-hidden > *:not(#gree-app-container):not(#page-load-overlay):not(#debug-panel-float-btn):not(#debug-panel-dialog):not(.footer-outer) {
    display: none !important;
}
body.gree-app-wrapped.gree-ui-hidden #gree-app-container {
    --gree-footer-area: 0 !important;
    --gree-footer-reveal-offset: 0px !important;
}
/* GREEフッター非表示時: アプリフッター・トグルバーを画面下端に固定（上部に寄らないようにする） */
body.gree-app-wrapped.gree-ui-hidden #gree-app-container .game-container .footer-outer {
    bottom: 0 !important;
    top: auto !important;
}
/* GREEフッター非表示時・トップ画面: 下端の余白をやめ黒い矩形が出ないようにする */
body.gree-app-wrapped.gree-ui-hidden.page-vtop #gree-app-container > .main-layout {
    padding-bottom: 0 !important;
}
/* GREEフッター非表示時・ローディング画面: 同上（トップ画面と同様） */
body.gree-app-wrapped.gree-ui-hidden.page-loading #gree-app-container > .main-layout {
    padding-bottom: 0 !important;
}

/* GREEのUIを表示するとき: スクロールコンテナは #gree-app-container のみとし、GREEフッターはその外（ビューポート下端）に固定 */
body.gree-app-wrapped.gree-ui-scroll-mode {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    background: #000 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
html.gree-app-wrapped.gree-ui-scroll-mode,
html.gree-app-wrapped body.gree-ui-scroll-mode {
    background: #000 !important;
}

body.gree-app-wrapped.gree-ui-reveal-mode {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    background: #000 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
html.gree-app-wrapped.gree-ui-reveal-mode,
html.gree-app-wrapped body.gree-ui-reveal-mode {
    background: #000 !important;
}
body.gree-app-wrapped.gree-ui-reveal-mode #gree-app-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
    background: transparent !important;
}
body.gree-app-wrapped.gree-ui-reveal-mode #gree-app-container > .main-layout {
    padding-bottom: 0 !important;
}
body.gree-app-wrapped.gree-ui-reveal-mode .gree-ui-toggle-bar {
    display: none !important;
}
body.gree-app-wrapped.gree-ui-reveal-mode > *:not(#gree-app-container):not(#page-load-overlay):not(#debug-panel-float-btn):not(#debug-panel-dialog):not(.footer-outer) {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: calc(var(--gree-footer-reveal-offset, 0px) - max(var(--gree-footer-area, 72px), 72px)) !important;
    width: min(100%, 720px) !important;
    max-width: 100vw !important;
    z-index: 850 !important;
    transition: bottom 0.18s ease !important;
}
body.gree-app-wrapped.gree-ui-reveal-mode:not(.gree-footer-area-ready) > *:not(#gree-app-container):not(#page-load-overlay):not(#debug-panel-float-btn):not(#debug-panel-dialog):not(.footer-outer) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: none !important;
}
body.gree-app-wrapped.gree-ui-reveal-mode.gree-ui-reveal-dragging > *:not(#gree-app-container):not(#page-load-overlay):not(#debug-panel-float-btn):not(#debug-panel-dialog):not(.footer-outer) {
    transition: none !important;
}
body.gree-app-wrapped.gree-ui-scroll-mode #gree-app-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    /* アプリフッターとGREEフッターの間に隙間を開けないため、下端のパディングを0に */
    padding-bottom: 0 !important;
    /* 下端の余白（黒い帯）を透過させるためコンテナ背景を透明に */
    background: transparent !important;
}
/* GREEフッター表示時は .main-layout 内でフッター分の余白を確保しない（余白が白い／黒い矩形として見えないようにする） */
body.gree-app-wrapped.gree-ui-scroll-mode #gree-app-container > .main-layout {
    padding-bottom: 0 !important;
}
body.gree-app-wrapped.gree-ui-scroll-mode > *:not(#gree-app-container):not(#page-load-overlay):not(#debug-panel-float-btn):not(#debug-panel-dialog) {
    flex-shrink: 0 !important;
    min-height: 0 !important;
}

/* GREEフッター表示時（スクロールモード含む）: アプリフッターは常に固定でGREEフッター直上に表示（absoluteだとスクロール内に入りGREEの裏に隠れるため） */
/* 計測が0のときも下端に張り付かないよう最低72px。余裕加算は行わず計測値のみで位置決め */
body.gree-app-wrapped.gree-ui-scroll-mode #gree-app-container .game-container .footer-outer {
    position: fixed !important;
    bottom: max(var(--gree-footer-area, 72px), 72px) !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 900 !important;
}

/* DBGフロートボタンは画面幅に引き伸ばされないようにする */
body.gree-app-wrapped #debug-panel-float-btn.debug-panel-float-btn {
    width: clamp(32px, 8vmin, 64px) !important;
    min-width: clamp(32px, 8vmin, 64px) !important;
    max-width: none !important;
}

/* gree.js 時（GREEフッター表示ON）: アプリのフッターを固定。トグルバーはその最下部にあり、すぐ下に GREE フッターが表示される */
/* 計測が0のときもGREEフッター直上に置くため最低72px。ダイアログ/アラートより背面に保つため z-index は 1000 未満に抑える */
body.gree-app-wrapped #gree-app-container .game-container .footer-outer {
    position: fixed !important;
    bottom: max(var(--gree-footer-area, 72px), 72px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 900 !important;
}

/* GREE版ホーム: フッターを #gree-app-container 直下に置いた場合（.game-container の overflow 外で確実に表示するため） */
body.gree-app-wrapped #gree-app-container > .footer-outer {
    position: fixed !important;
    bottom: max(var(--gree-footer-area, 72px), 72px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(100%, 720px) !important;
    z-index: 900 !important;
    background: transparent !important;
}
body.gree-app-wrapped.gree-ui-hidden #gree-app-container > .footer-outer {
    bottom: 0 !important;
}
body.gree-app-wrapped.gree-ui-scroll-mode #gree-app-container > .footer-outer {
    bottom: max(var(--gree-footer-area, 72px), 72px) !important;
    z-index: 900 !important;
}
/* #gree-app-container 直下フッターの子要素も GREE 用の余白・トグルバースタイルを適用 */
body.gree-app-wrapped #gree-app-container > .footer-outer .footer-buttons {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body.gree-app-wrapped #gree-app-container > .footer-outer .gree-ui-toggle-bar {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #B4D2C5 !important;
    background-image: none !important;
}
@media (max-width: 768px) {
    body.gree-app-wrapped #gree-app-container > .footer-outer {
        bottom: min(max(var(--gree-footer-area, 72px), 72px), 96px) !important;
    }
}

/* ========== フッターを body 直下に配置した場合（gree_ui.js で移動。全 GREE ページで確実に前面表示するため） ========== */
body.gree-app-wrapped > .footer-outer {
    position: fixed !important;
    bottom: max(var(--gree-footer-area, 72px), 72px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(100%, 720px) !important;
    z-index: 900 !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}
body.gree-app-wrapped.gree-ui-hidden > .footer-outer {
    bottom: 0 !important;
}
body.gree-app-wrapped.gree-ui-scroll-mode > .footer-outer {
    bottom: max(var(--gree-footer-area, 72px), 72px) !important;
    z-index: 900 !important;
}
body.gree-app-wrapped > .footer-outer .footer-buttons {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body.gree-app-wrapped > .footer-outer .gree-ui-toggle-bar {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #B4D2C5 !important;
    background-image: none !important;
}
@media (max-width: 768px) {
    body.gree-app-wrapped > .footer-outer {
        bottom: min(max(var(--gree-footer-area, 72px), 72px), 96px) !important;
    }
}

/* スマホ: 計測値が過大だと隙間が出るため上限を設ける */
@media (max-width: 768px) {
    body.gree-app-wrapped #gree-app-container .game-container .footer-outer {
        bottom: min(max(var(--gree-footer-area, 72px), 72px), 96px) !important;
    }
}

/* reveal-mode: コンテンツ最下部でさらにスクロールすると、アプリフッターの下から GREE フッターをせり上げて見せる */
body.gree-app-wrapped.gree-ui-reveal-mode #gree-app-container .game-container .footer-outer,
body.gree-app-wrapped.gree-ui-reveal-mode #gree-app-container > .footer-outer,
body.gree-app-wrapped.gree-ui-reveal-mode > .footer-outer {
    position: fixed !important;
    bottom: var(--gree-footer-reveal-offset, 0px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 900 !important;
    transition: bottom 0.18s ease !important;
}
body.gree-app-wrapped.gree-ui-reveal-mode.gree-ui-reveal-dragging #gree-app-container .game-container .footer-outer,
body.gree-app-wrapped.gree-ui-reveal-mode.gree-ui-reveal-dragging #gree-app-container > .footer-outer,
body.gree-app-wrapped.gree-ui-reveal-mode.gree-ui-reveal-dragging > .footer-outer {
    transition: none !important;
}


/* ========== テキスト輪郭ユーティリティ ========== */
/* ボタン・ラベル等で読みやすくするため、文字の周りに色付きの輪郭を付けるクラス */
/* 黒文字の周りを白く */
.text-outline-white {
    text-shadow:
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        0 1px 0 #fff,
        0 -1px 0 #fff,
        1px 0 #fff,
        -1px 0 #fff;
}

/* 白文字の周りを黒く */
.text-outline-black {
    text-shadow:
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 1px 0 #000,
        0 -1px 0 #000,
        1px 0 #000,
        -1px 0 #000;
}

/* 黒文字の周りを白く（大きい輪郭） */
.text-outline-white-large {
    text-shadow:
        2px 2px 0 #fff,
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        0 2px 0 #fff,
        0 -2px 0 #fff,
        2px 0 0 #fff,
        -2px 0 0 #fff,
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff;
}

/* 白文字の周りを黒く（大きい輪郭） */
.text-outline-black-large {
    text-shadow:
        2px 2px 0 #000,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        0 2px 0 #000,
        0 -2px 0 #000,
        2px 0 #000,
        -2px 0 #000,
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 1px 0 #000,
        0 -1px 0 #000,
        1px 0 #000,
        -1px 0 #000;
}

/* 白文字の周りを緑く（そうびウィンドウパネル用、濃い緑） */
.text-outline-green {
    text-shadow:
        1px 1px 0 #4a7c59,
        -1px -1px 0 #4a7c59,
        1px -1px 0 #4a7c59,
        -1px 1px 0 #4a7c59,
        0 1px 0 #4a7c59,
        0 -1px 0 #4a7c59,
        1px 0 #4a7c59,
        -1px 0 #4a7c59;
}

/* 白文字の周りを赤く（マイナス値用） */
.text-outline-red {
    text-shadow:
        1px 1px 0 #ff0000,
        -1px -1px 0 #ff0000,
        1px -1px 0 #ff0000,
        -1px 1px 0 #ff0000,
        0 1px 0 #ff0000,
        0 -1px 0 #ff0000,
        1px 0 #ff0000,
        -1px 0 #ff0000;
}

/* ========== メインレイアウト・ゲームコンテナ ========== */
/* 中央寄せの横並び。ゲーム領域は 720×1280 を基準とし、背景画像で覆う */
.main-layout {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /* game-container の外側に見えるフッター予約領域でも黒地を出さないため、
     * 親側にも同じ base_bg01 を敷く。cover を使うため画像の縦横比は維持される。 */
    background-image: url('../img/common/base_bg01.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

/* ゲーム画面の論理サイズ。背景画像・Canvas・ヘッダー/フッターの土台 */
.game-container {
    width: 720px;
    height: 1280px;
    position: relative;
    overflow: hidden;
    background-image: url('../img/common/base_bg01.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 0;
}

/* 背景オーバーレイ（base_bg02.png を重ねる） */
.game-container::after {
    content: '';
    position: absolute;
    left: 70%;
    top: 30%;
    /* 固定サイズ（画面サイズに応じて自動変更しない） */
    width: 1180px;
    height: 1180px;
    transform: translateX(-50%);
    background-image: url('../img/common/base_bg02.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    pointer-events: none;
    opacity: 0.95;
}

/* 個別背景のクラス定義 */
/* ガチャ実行画面（v_gacha_exec.html）用 */
.game-container.bg-gacha {
    background-image: url('../img/v_gacha01.png');
    background-size: 320px auto;
    background-position: center top;
}

/* クエスト画面（v_quest_list.html）用 */
.game-container.bg-quest {
    background-image: url('../img/v_chapter01.png');
    background-size: cover;
    background-position: center;
}

/* スキルパス画面（v_upgrade_list.html）用 */
.game-container.bg-skillpath {
    background-image: url('../img/v_skillpath_01.png');
    background-size: cover;
    background-position: center;
}

/* Canvas表示最適化 */
#game {
    object-fit: contain;
    background: transparent;
}

.controls {
    font-size: 11px;
}

/* ========== ページヘッダー（プレイヤー名・リソース表示） ========== */
/* z-index はオーバーレイ（5000以上）より低くし、購入処理中・ダイアログが前面に出るようにする */
.page-header {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    background: transparent;
    padding: 12px 16px;
    z-index: 100;
    min-height: 100px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    position: relative;
}

.header-left-section {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
}

.header-icon-item {
    position: relative;
    width: 100px;
    height: 100px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-icon-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.header-icon-img {
    position: relative;
    width: 75%;
    height: 75%;
    object-fit: cover;
    z-index: 2;
    border-radius: 50%;
}

.header-level-display {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    padding: 0;
}

.header-level-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    left: 0;
    top: 0;
}

.header-level-label {
    position: relative;
    font-size: 18px;
    color: #000;
    z-index: 2;
    font-weight: bold;
    padding-left: 20px;
}

.header-level-value {
    position: relative;
    font-size: 20px;
    color: #000;
    font-weight: bold;
    z-index: 2;
    padding-right: 4px;
}

.header-player-name-wrapper {
    position: absolute;
    left: 110px;
    right: 16px; /* ヘッダー右パディングに合わせ、画面幅に応じて右端まで伸ばす */
    top: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* プレイヤー名は左、デバッグボタンは右端に配置 */
    gap: 8px;
    z-index: 10;
}

/* トップ（ホーム）画面のタイトル：画面サイズに応じたレスポンシブな文字サイズ（スマホではやや大きく） */
.header-player-name {
    font-size: clamp(18px, 5.5vw, 22px);
    color: #000;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 4px;
    border-bottom: 2px solid #000;
    width: 450px;
    min-width: 20em; /* 最低20文字は表示できるよう余裕を持たせる（22px × 20 ≒ 440px） */
    max-width: min(450px, 45vw); /* 画面外にはみ出さないよう上限を設ける */
    /* プレイヤー名の白いフチ：text-shadow で四方に白を重ねて輪郭を表現（.text-outline-white と同様） */
    text-shadow:
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        0 1px 0 #fff,
        0 -1px 0 #fff,
        1px 0 0 #fff,
        -1px 0 0 #fff;
}

.header-resources-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    flex: 1;
    min-width: 0;
}

.header-resources {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    width: 100%;
    flex: 1;
}

.header-resource-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 0;
    height: 60px;
    padding: 0;
    margin: 0;
}

.header-resource-item.header-level {
    flex: 0 0 auto;
    min-width: 160px;
    width: 160px;
}

.header-resource-item.header-eg {
    flex: 0 0 auto;
    min-width: 160px;
    width: 160px;
}

.header-resource-item.header-gold-ruby {
    flex: 0 0 auto;
    min-width: 260px;
    width: 260px;
}

.header-resource-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    left: 0;
    top: 0;
}


.header-resource-value {
    position: relative;
    font-size: 20px;
    color: #fff;
    font-weight: bold;
    z-index: 2;
    text-align: center;
    white-space: nowrap;
    padding-left: 12px;
}

.header-gold-ruby {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.header-gold-ruby .header-resource-bg {
    object-fit: contain;
}

.header-gold-value {
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: left;
    padding-left: 60px;
    padding-right: 0;
}

.header-ruby-value {
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: left;
    padding-left: 24px;
    padding-right: 0;
}

/* ========== フッター（画面下端固定のナビゲーションボタン） ========== */
/* フッター全体のラップ。z-index はページ遷移/購入ブロックオーバーレイより低くし、ダイアログ・処理中表示が前面に出るようにする */
.footer-outer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 720px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    gap: 0;
}
/* GREE版: フッター領域の余白は透過させる（黒塗りにならないように） */
body.gree-app-wrapped #gree-app-container .game-container .footer-outer {
    background: transparent;
}

/* フッターボタン行（トグルバーとの間の余白をなくすため padding-bottom は .footer-outer 内で 0） */
.footer-buttons {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(6px, 1.4vw, 18px);
    padding: 8px 16px;
    padding-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
    background-image: url('../img/footer/footer_bg01.png');
    background-size: 100% 60px;
    background-position: bottom center;
    background-repeat: no-repeat;
    pointer-events: none; /* allow taps to pass through empty areas; buttons override */
}

/* タッチハイライト・長押し時の画像選択を防ぐ */
.footer-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    text-decoration: none;
    pointer-events: auto; /* enable clicks even if parent has pointer-events:none */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* フッター直下の横長バー: GREEのUI表示／非表示切替（横幅100%・画面サイズに応じてレスポンシブ） */
/* トグルバー上下の余白をなくす */
.footer-outer .footer-buttons {
    padding-bottom: 0;
}
.gree-ui-toggle-bar {
    width: 100%;
    height: var(--gree-toggle-bar-height, 16px);
    min-height: 16px;
    margin: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    padding-top: 0;
    padding-bottom: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* GREE版: トグルバーの背景色を #B4D2C5 にし、上下・内包要素の余白を0に */
body.gree-app-wrapped #gree-app-container .game-container .gree-ui-toggle-bar {
    background-color: #B4D2C5 !important;
    background-image: none !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0 !important;
}
body.gree-app-wrapped #gree-app-container .game-container .gree-ui-toggle-bar .gree-ui-toggle-btn {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    line-height: 0 !important;
}
/* トグルバー内画像：横幅だけスケーラブル（幅100％・高さはバーに固定、coverで縦ははみ出し分をトリム） */
body.gree-app-wrapped #gree-app-container .game-container .gree-ui-toggle-bar .gree-ui-toggle-bar-icon {
    display: block !important;
    vertical-align: middle !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
/* GREE版: トグルバーの上下の余白をなくす（フッターボタン行の上下パディングを0に） */
body.gree-app-wrapped #gree-app-container .game-container .footer-outer .footer-buttons {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body.gree-app-wrapped #gree-app-container .game-container .footer-outer .gree-ui-toggle-bar {
    margin: 0 !important;
    padding: 0 !important;
}

.gree-ui-toggle-bar .gree-ui-toggle-btn {
    width: 100%;
    height: 100%;
    margin: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* トグルバー内画像：横幅だけスケーラブル（幅100％・高さはバーに固定） */
.gree-ui-toggle-bar .gree-ui-toggle-btn .gree-ui-toggle-bar-icon {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.footer-button-icon {
    width: clamp(60px, 12.5vw, 94px);
    height: clamp(60px, 12.5vw, 94px);
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none; /* タップは親の .footer-button に渡し、長押しメニューを画像で出さない */
}

.footer-button-label {
    font-size: clamp(14px, 3.4vw, 20px);
    font-weight: bold;
    color: #c8e6f2;
    text-shadow:
        -2px -2px 0 #3f2c1a,
         2px -2px 0 #3f2c1a,
        -2px  2px 0 #3f2c1a,
         2px  2px 0 #3f2c1a,
         0px -2px 0 #3f2c1a,
         0px  2px 0 #3f2c1a,
        -2px  0px 0 #3f2c1a,
         2px  0px 0 #3f2c1a;
    line-height: 1.1;
}

/* ========== コンテンツ要素（contents）・スクロールコンテナ ========== */
/* カスタム要素 contents はスクロールコンテナの子として使う。単体ではスクロールしない */
contents {
    flex-direction: column;
    color: #ffffff;
    /* ページごとのスクロールコンテナ（.page-scroll 等）の内部で利用する想定 */
    position: static;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* 共通スクロールコンテナ。ヘッダー・フッターは固定し、この要素だけ縦スクロール */
.page-scroll {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;            /* 画面全体の高さ */
    z-index: 3;               /* ヘッダー(100)・フッター(1000/5000)より背面。ページ遷移オーバーレイが最前面 */
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    /* スクロールバーを非表示（Firefox / Edge） */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* スクロール内側のラップ。ヘッダー/フッターと重ならないよう上下に余白を確保 */
.page-scroll-inner {
    /* ヘッダーとフッターの高さ分の余白（PC基準）。スマホはメディアクエリで上書き */
    padding-top: 130px;
    padding-bottom: 120px;
    /* スクロール領域を最低でもビューポート高さにし、短いページでも中央付近に内容が来るようにする */
    min-height: 100%;
    /* min-height: 2000px;       ページの最低高さを設定したいときはコメントアウト外す */
}

/* page-scroll 内で使用される contents のリセット */
.page-scroll contents {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
    z-index: auto;
}

/* スクロールバーを非表示（Chrome / Safari） */
.page-scroll::-webkit-scrollbar {
    display: none;
}

/* Page common selected list (shared across pages) */
.page-selected-list {
	width: 100%;
	max-width: none;
	margin: 0;
	background: rgba(182, 193, 255, 0.3);
	padding: 4px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	font-weight: bold;
	color: #f0f0f0;
	box-sizing: border-box;
	height: 100px;
}

.page-selected-list .page-selected-btn {
	flex: 1;
	height: 100%;
	border: 1px solid rgba(230, 230, 230, 0.8);
	margin: 0 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #f0f0f0;
	text-decoration: none;
	box-sizing: border-box;
	background: transparent;
}

.page-selected-list .page-selected-btn:hover {
	background: rgba(0, 0, 0, 0.3);
}

/* ========== レスポンシブ（720px 未満：スマホ・ narrow ビューポート） ========== */
@media (max-width: 720px) {
    /* メインレイアウト：右側の黒い縦線を解消するため */
    .main-layout {
        width: 100vw;
    }

    /* ヘッダーを画面幅に合わせて自動縮小（左上基準で見切れないように） */
    /* 古いAndroid等で calc() が scale() 内で効かない場合のフォールバック＋-webkit-対応 */
    .page-header {
        transform: scale(1);
        -webkit-transform: scale(1);
        transform-origin: top left;
        -webkit-transform-origin: top left;
    }

    /* base_bg01: 100% auto だと画像の描画高がコンテナより短い縦長端末で下端が未塗りになり、
     * 透過下の #gree-app-container（#000）がフッター付近に黒帯として見える。
     * cover でコンテナ全面を常に覆い、上基準でトリムする（.page-scroll-inner が背より長くても同様）。 */
    .game-container {
        width: 100% !important; /* スマホサイズでは画面幅に合わせる */
        max-width: 100vw; /* 画面幅を超えないようにする */
        background-size: cover !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
    }

    /* 背景画像のオーバーレイ処理 */
    .game-container::after {
        left: 75%;
        top: 15%;
        /* 画面幅に応じてサイズを調整：375pxで180vw、720pxで150vw（線形補間） */
        width: clamp(150vw, calc(180vw - 30vw * ((100vw - 375px) / 345px)), 180vw);
        height: auto;
        /* 縦横比を保持（正方形を想定、必要に応じて調整） */
        aspect-ratio: 1 / 1;
        transform: translateX(-50%);
    }

    /* フッター関連のレスポンシブ対応 */
    .footer-buttons {
        gap: clamp(4px, 2vw, 14px);
        padding: 8px 10px;
        background-size: 100% 58px;
    }

    .footer-button-icon {
        width: clamp(50px, 16vw, 74px);
        height: clamp(50px, 16vw, 74px);
    }

    .footer-button-label {
        font-size: clamp(12px, 3.6vw, 18px);
        text-shadow:
            -1px -1px 0 #3f2c1a,
             1px -1px 0 #3f2c1a,
            -1px  1px 0 #3f2c1a,
             1px  1px 0 #3f2c1a,
             0px -1px 0 #3f2c1a,
             0px  1px 0 #3f2c1a,
            -1px  0px 0 #3f2c1a,
             1px  0px 0 #3f2c1a;
    }

    /* スマホ表示時のスクロールコンテナpadding調整（画面幅に応じて動的に変化） */
    /* 375pxで80px、720pxで120pxになるように線形補間 */
    .page-scroll-inner {
        padding-top: clamp(80px, calc(80px + (120px - 80px) * ((100vw - 375px) / (720px - 375px))), 120px);
        padding-bottom: clamp(80px, calc(80px + (120px - 80px) * ((100vw - 375px) / (720px - 375px))), 120px);
    }
}

/* 古いAndroid用：calc()非対応でもヘッダーがレスポンシブになるよう固定scaleでフォールバック */
@media (max-width: 600px) {
    .page-header {
        transform: scale(0.833);
        -webkit-transform: scale(0.833);
        transform-origin: top left;
        -webkit-transform-origin: top left;
    }
}
@media (max-width: 480px) {
    .page-header {
        transform: scale(0.667);
        -webkit-transform: scale(0.667);
        transform-origin: top left;
        -webkit-transform-origin: top left;
    }
}
@media (max-width: 400px) {
    .page-header {
        transform: scale(0.556);
        -webkit-transform: scale(0.556);
        transform-origin: top left;
        -webkit-transform-origin: top left;
    }
}
@media (max-width: 360px) {
    .page-header {
        transform: scale(0.5);
        -webkit-transform: scale(0.5);
        transform-origin: top left;
        -webkit-transform-origin: top left;
    }
}
@media (max-width: 320px) {
    .page-header {
        transform: scale(0.444);
        -webkit-transform: scale(0.444);
        transform-origin: top left;
        -webkit-transform-origin: top left;
    }
}

/* 対応ブラウザでは calc でスムーズにスケール（上記フォールバックの後に記述し上書き） */
@media (max-width: 720px) {
    .page-header {
        transform: scale(calc(100vw / 720px));
        -webkit-transform: scale(calc(100vw / 720px));
        transform-origin: top left;
        -webkit-transform-origin: top left;
    }
}

/* Ensure custom include elements and page-selected-list stretch to match contents width */
html-include {
    display: block;
    width: 100%;
}

/* 共通：スクロールバー非表示 */
.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.page-selected-list {
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
}

/* ===== ホーム画面（v_home）専用スタイル ===== */
.stage-button {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    display: block;
}
.stage-button img {
    display: block;
    width: clamp(80px, 20vw, 140px);
    height: auto;
    max-height: clamp(48px, 12vw, 84px);
    object-fit: contain;
}

.center-buttons-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
    margin-bottom: 4px;
}
.center-stage-wrap {
    margin-bottom: 0;
}

.quest-button {
    width: clamp(70px, 18vw, 100px);
    height: clamp(36px, 10vw, 50px);
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    color: white;
    font-size: clamp(10px, 2.8vw, 14px);
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
    opacity: 0.2;
    box-sizing: border-box;
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.button-text {
    font-size: clamp(8px, 2.2vw, 11px);
    color: #000;
    text-align: center;
    font-weight: bold;
}

body.page-home .game-container::after {
    z-index: 0;
}

body.page-home .home-bed-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/home/home_bed_01.png');
    background-position: 0 10vh;
    background-repeat: no-repeat;
    background-size: min(100%, 720px) auto;
    z-index: 0;
    pointer-events: none;
}

body.page-home .page-scroll-inner {
    position: relative;
    z-index: 1;
    min-height: 0;
    overflow: visible;
    box-sizing: border-box;
}

body.page-home .page-scroll-inner contents {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

body.page-home .page-scroll-inner .home-quest-select-wrap,
body.page-home .page-scroll-inner .center-receive-row,
body.page-home .page-scroll-inner .home-event-icon-wrap,
body.page-home .page-scroll-inner .user-home {
    position: relative;
    z-index: 1;
}

body.page-home .page-scroll-inner .center-receive-row,
body.page-home .page-scroll-inner .home-event-icon-wrap {
    flex-shrink: 0;
}

body.page-home .page-scroll-inner contents .center-receive-row + html-include {
    flex-shrink: 0;
}

body.page-home .home-quest-select-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 14px;
    width: 100%;
    max-width: 100vw;
    min-height: 260px;
    max-height: min(42vh, 320px);
    box-sizing: border-box;
    flex-shrink: 1;
}

body.page-home .home-quest-select-scroll {
    --quest-slot-width: min(54vw, 389px);
    position: relative;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    overflow-y: hidden;
    padding-top: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: max(0.5vw, env(safe-area-inset-left));
    padding-right: max(0.5vw, env(safe-area-inset-right));
    box-sizing: border-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

body.page-home .home-quest-select-scroll.is-slide-animating .home-quest-select-item {
    transition: none;
}

body.page-home .home-quest-select-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    z-index: 5000;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body.page-home .home-quest-select-btn img {
    display: block;
    width: clamp(26vw, 34vw, 44vw);
    height: auto;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

body.page-home .home-quest-select-btn-l {
    left: 24vw;
    right: auto;
    transform: translate(-50%, -50%);
}

body.page-home .home-quest-select-btn-r {
    left: auto;
    right: 24vw;
    transform: translate(50%, -50%);
}

body.page-home .home-quest-select-btn.hidden-when-no-scroll {
    visibility: hidden;
    pointer-events: none;
}

body.page-home .home-quest-select-scroll::-webkit-scrollbar {
    display: none;
}

body.page-home .home-quest-select-scroll-inner {
    display: flex;
    flex-direction: row;
    gap: 0.6vw;
    padding: clamp(0.5vw, 1vw, 1vw) 0;
    width: max-content;
    min-width: 100%;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

body.page-home .home-quest-select-scroll-spacer {
    flex-shrink: 0;
    width: calc(50vw - var(--quest-slot-width) / 2);
    min-width: 0;
    pointer-events: none;
}

body.page-home .home-quest-select-item {
    --quest-item-scale: 1;
    flex-shrink: 0;
    width: var(--quest-slot-width);
    min-height: 0;
    max-width: 389px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.25vw;
    background: transparent;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    overflow: visible;
    transform: scale(var(--quest-item-scale));
    transform-origin: center center;
    transition: transform 0.12s ease-out;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body.page-home .home-quest-select-item-img {
    display: block;
    max-width: min(389px, 100%, var(--quest-slot-width));
    width: auto;
    height: auto;
    max-height: min(319px, calc(var(--quest-slot-width) * 0.82), 80vw, calc(34vh - 3em), 100%);
    object-fit: contain;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

body.page-home .home-quest-select-item-label {
    color: #000;
    font-size: clamp(3vw, 4vw, 5vw);
    font-weight: bold;
    line-height: 1.2;
    margin-top: -7vw;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    /* クエスト画像ラベル専用: 文字フチの色を #F1FBD5 に指定 */
    text-shadow:
        2px 2px 0 #F1FBD5,
        -2px -2px 0 #F1FBD5,
        2px -2px 0 #F1FBD5,
        -2px 2px 0 #F1FBD5,
        0 2px 0 #F1FBD5,
        0 -2px 0 #F1FBD5,
        2px 0 0 #F1FBD5,
        -2px 0 0 #F1FBD5,
        1px 1px 0 #F1FBD5,
        -1px -1px 0 #F1FBD5,
        1px -1px 0 #F1FBD5,
        -1px 1px 0 #F1FBD5;
}

body.page-home .home-quest-select-item:not(.selected) .home-quest-select-item-label {
    display: none;
}

body.page-home .home-quest-select-item:hover,
body.page-home .home-quest-select-item.selected {
    background: transparent;
}

body.page-home .center-receive-row {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 8px;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

body.page-home .center-receive-row .center-stage-wrap {
    position: absolute;
    right: max(1vw, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
}

body.page-home .center-receive-wrap,
body.page-home .stage-button,
body.page-home .home-event-icon-wrap,
body.page-home .home-event-banner-link,
body.page-home .home-menu-icon-wrap,
body.page-home .home-ranking-icon-wrap,
body.page-home .home-friend-icon-wrap,
body.page-home .home-present-icon-wrap,
body.page-home .home-news-icon-wrap,
body.page-home .home-mission-icon-wrap {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body.page-home .center-receive-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

body.page-home .stage-button img {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

body.page-home .home-event-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

body.page-home .home-event-banner-link {
    display: block;
    line-height: 0;
    text-decoration: none;
    color: inherit;
}

body.page-home .home-event-icon-img {
    width: auto;
    height: auto;
    max-width: min(calc(100vw - 4vw), 90vw, 648px);
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0.3vw 0.5vw rgba(0, 0, 0, 0.35));
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

body.page-home .page-scroll-inner .home-icons-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
    margin-bottom: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

body.page-home .page-scroll-inner .home-left-icons,
body.page-home .page-scroll-inner .home-right-icons {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8vw;
    padding: 4px 0 0;
    pointer-events: auto;
}

body.page-home .page-scroll-inner .home-left-icons {
    padding-left: env(safe-area-inset-left);
    align-items: flex-start;
}

body.page-home .page-scroll-inner .home-right-icons {
    padding-right: env(safe-area-inset-right);
    align-items: flex-end;
}

body.page-home .home-menu-icon-wrap,
body.page-home .home-ranking-icon-wrap,
body.page-home .home-friend-icon-wrap,
body.page-home .home-present-icon-wrap,
body.page-home .home-news-icon-wrap,
body.page-home .home-mission-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

body.page-home .home-menu-icon-img {
    width: clamp(12vw, 12.5vw, 14vw);
    height: clamp(12vw, 12.5vw, 14vw);
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    display: block;
    vertical-align: bottom;
    margin-bottom: -0.8vw;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

body.page-home .home-menu-icon-label {
    font-size: clamp(2.6vw, 3vw, 3.6vw);
    font-weight: bold;
    color: #000;
    line-height: 1;
    margin-top: -0.3vw;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 720px) {
    body.page-home .home-quest-select-wrap { margin-bottom: 12px; min-height: 220px; max-height: min(34vh, 260px); }
    body.page-home .home-quest-select-btn-l { left: 26vw; }
    body.page-home .home-quest-select-btn-r { right: 26vw; }
    body.page-home .home-quest-select-btn img {
        width: clamp(24vw, 32vw, 40vw);
        max-width: 200px;
        max-height: min(200px, 28vh);
    }
    body.page-home .home-quest-select-item-img { max-height: min(260px, calc(var(--quest-slot-width) * 0.82), calc(30vh - 2.5em)); }
    body.page-home .home-quest-select-scroll {
        padding-left: max(0.8vw, env(safe-area-inset-left));
        padding-right: max(0.8vw, env(safe-area-inset-right));
    }
    body.page-home .home-quest-select-scroll-inner {
        gap: 0.6vw;
        padding: 0.6vw 0;
    }
    body.page-home .home-quest-select-item { padding: 0.25vw; }
    body.page-home .home-quest-select-item-label {
        font-size: clamp(2.8vw, 3.6vw, 4.5vw);
        margin-top: clamp(-7vw, -7vw, -4.5vw);
    }
    body.page-home .center-receive-row { margin-bottom: 6px; }
    body.page-home .home-bed-bg {
        background-position: 0 clamp(80px, calc(80px + (120px - 80px) * ((100vw - 375px) / (720px - 375px))), 120px);
    }
    body.page-home .home-menu-icon-img {
        width: clamp(12vw, 16vw, 18vw);
        height: clamp(12vw, 16vw, 18vw);
    }
}

@media (max-width: 380px) {
    body.page-home .home-quest-select-wrap { margin-bottom: 12px; min-height: 200px; max-height: min(32vh, 240px); }
    body.page-home .home-quest-select-btn-l { left: 28vw; }
    body.page-home .home-quest-select-btn-r { right: 28vw; }
    body.page-home .home-quest-select-item-label {
        font-size: clamp(2.5vw, 3.2vw, 4vw);
        margin-top: clamp(-6vw, -6vw, -4vw);
    }
    body.page-home .home-quest-select-btn img {
        width: clamp(22vw, 30vw, 36vw);
        max-width: 200px;
        max-height: min(180px, 26vh);
    }
    body.page-home .home-quest-select-item-img { max-height: min(220px, calc(26vh - 2.5em)); }
    body.page-home .home-quest-select-scroll {
        padding-left: max(0.6vw, env(safe-area-inset-left));
        padding-right: max(0.6vw, env(safe-area-inset-right));
    }
    body.page-home .home-quest-select-scroll-inner {
        gap: 0.6vw;
        padding: 0.6vw 0;
    }
    body.page-home .home-quest-select-item { padding: 0.25vw; }
    body.page-home .center-receive-row { margin-bottom: 6px; }
}

@media (min-width: 720px) {
    body.page-home .home-bed-bg {
        background-position: 0 130px;
    }
    body.page-home .home-menu-icon-img {
        width: 90px;
        height: 90px;
        min-width: 90px;
        min-height: 90px;
    }
    body.page-home .home-menu-icon-label { font-size: 22px; }
    body.page-home .center-receive-row {
        width: 100%;
        max-width: 720px;
        margin-left: 0;
        margin-right: 0;
    }
    body.page-home .home-quest-select-wrap { max-width: 720px; }
    body.page-home .home-quest-select-scroll {
        --quest-slot-width: 389px;
    }
    body.page-home .home-quest-select-scroll-spacer {
        width: 165px;
    }
    body.page-home .home-quest-select-btn-l {
        left: 172px;
        right: auto;
    }
    body.page-home .home-quest-select-btn-r {
        left: auto;
        right: 172px;
    }
    body.page-home .home-quest-select-btn img {
        width: 200px;
        max-width: 200px;
        max-height: 200px;
    }
    body.page-home .home-quest-select-item-label {
        font-size: 24px;
        margin-top: -22px;
    }
    body.page-home .stage-button img {
        max-width: 140px;
        max-height: 84px;
    }
}

/* ===== ショップ画面（v_shop_gacha_list）専用スタイル ===== */
.main-layout {
    display: flex;
}

:root {
    --shop-surface: rgba(255, 255, 255, 0.9);
    --shop-surface-muted: rgba(255, 255, 255, 0.75);
    --shop-border: #d2c6b6;
    --accent-secondary: #f4c07b;
    --text-strong: #5a4331;
    --text-muted: #8a7665;
}

.shop-layout {
    width: min(720px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 18px 60px;
    box-sizing: border-box;
}

.shop-section {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shop-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

.shop-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.shop-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #F1FBD5;
    border-radius: 50%;
    animation: shop-spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes shop-spin {
    to { transform: rotate(360deg); }
}

.shop-loading-text {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.shop-loading-error {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    max-width: 80%;
    word-wrap: break-word;
}

.shop-loading-retry-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #F1FBD5;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.shop-loading-retry-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

/* チャプターパック・キャラガチャ等の横スクロールスライダー用 */
.slider-wrapper {
    position: relative;
    overflow: visible !important;
    width: 100%;
}

/* 横スクロール可能なビューポート。縦スワイプは親の .page-scroll に伝えてページ全体を縦スクロール */
.slider-viewport {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    scroll-behavior: smooth;
    scroll-padding: 12px;
    /* 横はこの要素でスクロール、縦は親に伝える（pan-x pan-y で両方許可しブラウザに委ねる） */
    touch-action: pan-x pan-y !important;
    width: 100%;
    position: relative;
    overscroll-behavior-x: contain;
}

.shop-section .slider-viewport,
.page-scroll .slider-viewport,
contents .slider-viewport {
    overflow-x: scroll !important;
}

.page-scroll {
    overflow-x: visible !important;
}

.slider-viewport::-webkit-scrollbar {
    display: none;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-strong);
    cursor: pointer;
    z-index: 10;
    display: none;
}

@media (min-width: 721px) {
    .slider-nav {
        display: block;
    }
}

.slider-prev {
    left: -8px;
}

.slider-next {
    right: -8px;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.slider-track {
    display: flex;
    gap: 16px;
    scroll-snap-type: x mandatory;
}

.slider-card {
    flex: 0 0 clamp(260px, calc(100% - 24px), 640px);
    width: clamp(260px, calc(100% - 24px), 640px);
    background: var(--shop-surface-muted);
    border: 2px solid var(--shop-border);
    border-radius: 22px;
    padding: 20px;
    box-sizing: border-box;
    scroll-snap-align: center;
}

.slider-card--chapter-pack {
    padding: 0;
    background: none;
    border: none;
}

.chapter-pack-card {
    background: linear-gradient(to bottom, #f4e0b8 0%, #f4e0b8 60%, #d7f5c8 60%, #d7f5c8 100%);
    border: 1px solid #4d311b;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.chapter-pack-card-top {
    background: #f4e0b8;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chapter-pack-card-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.chapter-pack-card-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    flex-shrink: 0;
}

.chapter-pack-card-bottom {
    background: #d7f5c8;
    padding: 10px 18px 14px;
    border-top: 2px solid #d2c6b6;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.slider-card--gacha {
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
    user-select: none;
}

.slider-card--gacha .gacha-banner {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

.gacha-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 16px 20px;
    box-sizing: border-box;
    pointer-events: none;
}

.gacha-banner-overlay > * {
    pointer-events: auto;
}

.gacha-banner-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.gacha-banner-actions .shop-btn {
    flex: 1;
    min-width: 120px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    padding: 10px 8px;
}

.gacha-price {
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.equipment-gacha-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.shop-gold-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.equipment-gacha-image {
    width: 100%;
    height: auto;
    display: block;
}

.equipment-gacha-buttons {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    pointer-events: none;
}

.equipment-gacha-buttons > * {
    pointer-events: auto;
}

.equipment-gacha-button-left,
.equipment-gacha-button-right {
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.equipment-gacha-button-left .shop-btn,
.equipment-gacha-button-right .shop-btn {
    min-width: 140px;
}

.equip-gacha-price {
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.gold-bg-item {
    position: relative;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.gold-bg-image {
    width: 100%;
    height: auto;
    display: block;
}

.gold-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 12px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.gold-bg-overlay > * {
    pointer-events: auto;
}

.gold-bg-price {
    font-size: 22px;
    font-weight: 700;
    color: #5a4331;
    margin-top: 8px;
}

.gold-bg-overlay .shop-btn {
    max-width: 80%;
    padding: 8px 12px;
    font-size: 14px;
    flex: 0 0 auto;
}

.slider-card__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-strong);
}

.slider-card__meta {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

.slider-card__price {
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.slider-card__cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapter-pack-card-bottom .slider-card__buy {
    flex: 0 0 auto;
    padding: 6px 16px;
    font-size: 14px;
    min-width: auto;
}

.shop-btn {
    flex: 1;
    border: 1px solid #98b86a;
    border-radius: 24px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    background: linear-gradient(135deg, #e2f3d6, #c9f0b8);
    box-shadow: 0 4px 10px rgba(120, 148, 102, 0.45);
    cursor: pointer;
}

.timer-text {
    font-size: 14px;
    color: #000;
    font-weight: 700;
}

#shop-purchase-blocking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* GREE フッターは scroll-mode 時に 2147483646 まで上がるため、その前面に出す */
    z-index: 2147483646;
}
#shop-purchase-blocking-overlay.is-active {
    display: flex;
}
#shop-purchase-blocking-overlay .shop-purchase-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #F1FBD5;
    border-radius: 50%;
    animation: shop-purchase-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes shop-purchase-spin {
    to { transform: rotate(360deg); }
}
#shop-purchase-blocking-overlay .shop-purchase-text {
    color: #fff;
    font-size: 14px;
}

.shop-btn:disabled,
.shop-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    background: linear-gradient(135deg, #c5c9c2, #a8ada3);
    border-color: #8a8e87;
    color: #5a5a5a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

body.shop-purchase-in-progress .shop-btn,
body.shop-purchase-in-progress .slider-card__buy {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    background: linear-gradient(135deg, #c5c9c2, #a8ada3);
    border-color: #8a8e87;
    color: #5a5a5a;
}

@media (max-width: 740px) {
    .shop-layout {
        padding: 0 5px 80px;
    }
    .slider-card {
        flex: 0 0 88%;
        width: 88%;
    }
    .slider-card__price {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .equipment-gacha-buttons {
        bottom: 10px;
        gap: 12px;
    }
    .equipment-gacha-button-left .shop-btn,
    .equipment-gacha-button-right .shop-btn {
        min-width: 120px;
        padding: 6px 10px;
        font-size: 11px;
    }
    .timer-text {
        font-size: 11px;
    }
    .shop-gold-grid {
        gap: 5px;
        padding: 0 2px;
    }
    .gold-bg-item {
        max-width: none;
    }
    .gold-bg-overlay {
        padding: 10px 8px 12px;
    }
    .gold-bg-price {
        font-size: 18px;
    }
    .gold-bg-overlay .shop-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

