/* ==========================================================================
   1. 変数定義（テーマカラー・サイズ）
   ========================================================================== */
:root {
    --primary-red: #ff0000;
    --dark-red: #b71c1c;
    --gold: #d4af37;
    --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    --bg-black: #000000;
    --card-black: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #aaaaaa;
    --font-main: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --container-width: 1100px; /* 少し広めに調整 */
}

/* ==========================================================================
   2. ベーススタイル
   ========================================================================== */
body {
    margin: 0; padding: 0;
    background: var(--bg-black) url('/images/bg.png') fixed center / cover;
    color: var(--text-white);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: 0.3s; }

/* ==========================================================================
   3. レイアウト構造
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    gap: 30px;
    padding: 20px;
}

main { flex: 1; min-width: 0; }

.side-content { width: 300px; flex-shrink: 0; }

@media (max-width: 992px) {
    .container { flex-direction: column; padding: 10px; }
    .side-content { width: 100%; }
}

/* ==========================================================================
   4. ヘッダー・ナビゲーション
   ========================================================================== */
.site-header {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 2px solid var(--primary-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

/* スマホ用ハンバーガー */
.menu-trigger {
    display: none;
    width: 30px; height: 24px;
    background: none; border: none; cursor: pointer;
    position: relative; z-index: 101;
}
.menu-trigger span {
    position: absolute; left: 0; width: 100%; height: 3px;
    background: #fff; transition: 0.3s;
}
.menu-trigger span:nth-child(1) { top: 0; }
.menu-trigger span:nth-child(2) { top: 10px; }
.menu-trigger span:nth-child(3) { bottom: 0; }

.menu-trigger.active span:nth-child(1) { transform: translateY(10px) rotate(-45deg); }
.menu-trigger.active span:nth-child(2) { opacity: 0; }
.menu-trigger.active span:nth-child(3) { transform: translateY(-11px) rotate(45deg); }

@media (max-width: 992px) {
    .menu-trigger { display: block; }
    .nav-menu {
        position: fixed; top: 0; right: -100%;
        width: 80%; height: 100vh;
        background: #111; flex-direction: column;
        padding: 80px 20px; transition: 0.4s; z-index: 100;
    }
    .nav-menu.active { right: 0; }
}
/* --- ヘッダー内部のレイアウト調整 --- */
.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px; /* 高さを固定して安定させる */
}

/* ロゴの器 */
.header-logo {
    flex: 0 0 200px; /* 左側に固定幅を確保 */
}

/* ★中央寄せメニューの決定版 */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px; /* メニュー間の隙間 */
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem; /* 文字を大きく */
    white-space: nowrap; /* 改行禁止 */
    transition: 0.3s;
}

.nav-menu li a:hover {
    color: var(--gold);
}

/* 右側のログインエリア */
.header-right {
    flex: 0 0 200px; /* 右側にも左と同じ固定幅を確保して中央を出す */
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* --- スマホ時の挙動をリセット --- */
@media (max-width: 992px) {
    .header-logo { flex: 1; } /* スマホではロゴを優先 */
    .header-right { display: none; } /* スマホでは右端は隠すかメニュー内へ */

    .nav-menu {
        display: none; /* 初期状態は非表示 */
        flex-direction: column;
        justify-content: flex-start;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #111;
        padding-top: 80px;
        transition: 0.4s;
        z-index: 100;
        gap: 0; /* スマホ時は縦に詰める */
    }

    .nav-menu.active {
        display: flex; /* active時のみ表示 */
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #222;
    }

    .nav-menu li a {
        display: block;
        padding: 20px;
        font-size: 1.2rem;
    }
}
/* ==========================================================================
   5. モーダルシステム（共通化）
   ========================================================================== */
/* モーダルの土台（オーバーレイ） */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999; /* ヘッダー(1000)より圧倒的に上 */
    display: none; /* 基本は非表示 */
    justify-content: center;
    align-items: center;
}
.custom-modal-overlay.active {
    display: flex !important;
}

/* 3. モーダルの白い箱（共通の器） */
.modal-box {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease; /* じわっと出す */
}

/* 4. スタイル別の着せ替え */
/* ログイン用（白） */
.modal-box.light {
    background: #ffffff;
    color: #333;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* 会員登録用（黒・赤） */
.modal-box.dark {
    background: #1a1a1a;
    color: #fff;
    padding: 30px;
    border: 2px solid #ff0000;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.3);
}

/* 5. 共通パーツ：入力欄 */
.sh-input, .minimal-input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box; /* 幅がはみ出さない魔法の1行 */
    font-size: 16px; /* スマホでズームされないサイズ */
}

/* ダークモード用の入力欄 */
.modal-box.dark .sh-input {
    background: #000;
    border: 1px solid #444;
    color: #fff;
}

/* 6. 共通パーツ：閉じるボタン */
.custom-close-btn, .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 5px;
}

/* アニメーション */
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   6. コンポーネント（ボタン・カード）
   ========================================================================== */
.sh-btn-gold {
    background: var(--gold-gradient);
    color: #000;
    font-weight: bold;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.sh-btn-gold:hover { filter: brightness(1.2); transform: translateY(-1px); }

/* 出勤カードなどは views/sections/ 内で定義済みのため省略 */

/* ==========================================================================
   7. その他パーツ
   ========================================================================== */
.shop-info-card {
    background: linear-gradient(135deg, #1a1a1a, #000);
    border: 1px solid var(--gold);
    padding: 20px; border-radius: 8px; text-align: center;
}

footer {
    padding: 30px 0; text-align: center; font-size: 11px;
    border-top: 1px solid #222; margin-top: 50px; color: #666;
}

@media (max-width: 768px) {
    .u-hidden-sp {
        display: none !important;
    }
}