/* デザインシステムと共通変数（シニア向け文字拡大・高コントラスト） */
:root {
    --bg-color: #FDFBF7; /* 共通ベージュ背景 */
    --panel-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --accent-color: #E8834A; /* 共通メインオレンジ */
    --accent-hover: #d2723c;
    --correct-color: #5B9E6E;
    --error-color: #ef4444;
    --font-sans: 'Hiragino Maru Gothic ProN', 'BIZ UDPGothic', 'Meiryo', sans-serif;
    --shadow-premium: 0 6px 20px rgba(232, 131, 74, 0.1);
}

/* 全体設定 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-drag: none;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 共通固定ナビゲーションバー */
/* グローバルナビ（他ゲームと共通） */
.g-nav {
    position: fixed; top: 0; left: 0; right: 0; height: 52px;
    background: #E8834A; display: flex; align-items: center;
    padding: 0 16px; z-index: 100; gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.g-nav-arrow { color: white; font-size: 1.5rem; text-decoration: none; line-height: 1; }
.g-nav-title { color: white; font-size: 1rem; font-weight: bold; text-decoration: none;
    font-family: 'Hiragino Maru Gothic ProN', 'BIZ UDPGothic', 'Meiryo', sans-serif; }

/* アプリ容器 */
#app-container {
    flex: 1;
    margin-top: 52px; /* 固定ヘッダー分 */
    padding: 24px 16px;
    max-width: 600px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* カードスタイル */
.game-card {
    background: var(--panel-bg);
    border: 3.5px solid rgba(232, 131, 74, 0.25);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-premium);
    text-align: center;
}

.header-panel {
    border-color: var(--accent-color);
}

.game-title {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 6px;
    font-weight: bold;
}

.game-instruction {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* 星スロット */
#star-slots {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 2.2rem;
}

.star-icon {
    transition: transform 0.2s;
}

.star-icon.active {
    color: #fbbf24;
    transform: scale(1.2);
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.star-icon.inactive {
    color: #e5e7eb;
}

/* 太鼓レイアウト */
#drum-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.drum-btn {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 10px solid #555555;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2), inset 0 0 20px rgba(0,0,0,0.15);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s, filter 0.1s;
}

.drum-btn:active, .drum-btn.active {
    transform: scale(0.94);
    filter: brightness(1.3);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 0 25px rgba(255,255,255,0.4);
}

.drum-label {
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* 太鼓ごとの色分け */
.drum-red    { background: radial-gradient(circle, #ff4444 30%, #b31010 100%); }
.drum-blue   { background: radial-gradient(circle, #4488ff 30%, #1044b3 100%); }
.drum-yellow { background: radial-gradient(circle, #ffcc00 30%, #b38800 100%); }
.drum-green  { background: radial-gradient(circle, #44cc44 30%, #108810 100%); }

/* フッター */
#game-footer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.action-btn {
    font-size: 1.4rem;
    font-weight: bold;
    padding: 16px 40px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.1s;
    background: var(--accent-color);
    color: #ffffff;
    width: 100%;
}

.action-btn:active {
    transform: scale(0.97);
}

.action-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* モーダル */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #ffffff;
    border: 4px solid var(--accent-color);
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 460px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.modal-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--correct-color);
    margin-bottom: 12px;
}

.modal-message {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-btn {
    font-size: 1.3rem;
    font-weight: bold;
    padding: 14px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: var(--accent-color);
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 10px rgba(232, 131, 74, 0.25);
}

.modal-btn.secondary-btn {
    background: #f0f0f0;
    color: #333333;
    box-shadow: none;
}

.hidden {
    display: none !important;
}
