:root {
    /* デフォルト：奈良クラブイメージ */
    --bg-color: #003399;      
    --panel-bg: rgba(255, 255, 255, 0.9);
    --text-color: #000;
    --timer-bg: #fff;
    --accent-color: #e6b422; 
    --border-color: #000;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --panel-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --timer-bg: #2a2a2a;
    --accent-color: #bb86fc;
    --border-color: #444;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ★修正：時計とスコア枠（縦並びに変更） */
.timer-section {
    height: 20vh;
    margin: 10px;
    border: 4px solid var(--border-color);
    background-color: var(--timer-bg);
    display: flex;
    flex-direction: column; /* 縦並びにする */
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    gap: 0; /* 隙間を詰める */
}

/* ★修正：文字サイズを少し縮小 */
#timer {
    font-size: clamp(2rem, 10vw, 4rem); 
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap; 
}

#score-board {
    font-size: clamp(2.5rem, 12vw, 4.5rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--accent-color);
    white-space: nowrap; 
}

/* 選手表示枠 */
.lineup-container {
    height: 70vh;
    display: flex;
    gap: 10px;
    padding: 0 10px 10px 10px;
}

.team-column {
    flex: 1;
    background-color: var(--panel-bg);
    border: 3px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.team-name {
    background-color: var(--border-color);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 1.2rem;
    margin: 0;
}

.player-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    overflow-y: auto;
}

/* ★修正：選手リストの行間と文字サイズを縮小 */
.player-list li {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 5px 0; /* 8pxから5pxへ減らして行間を詰める */
    font-size: 1rem; /* 1.1remから縮小 */
    font-weight: bold;
    white-space: nowrap; 
    overflow: hidden;    
    cursor: pointer;
}

[data-theme="dark"] .player-list li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pos { 
    flex: 0 0 22px; 
    font-size: 0.85rem; /* 追加：少し小さくする */
    color: var(--bg-color); 
}
[data-theme="dark"] .pos { 
    color: var(--accent-color); 
}

.num { 
    flex: 0 0 20px; 
    font-size: 0.85rem; /* 追加：少し小さくする */
    text-align: right; 
    margin-right: 6px; 
}

.player-name {
    flex: 1;
    white-space: nowrap;
}

.goal-icon, .card-icon {
    font-size: 0.9em;
    margin-left: 5px;
}

.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: 1px solid #666;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ポップアップ（モーダル） */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.hidden { display: none !important; }

.modal-content {
    background: var(--panel-bg);
    width: 85%;
    max-width: 400px;
    padding: 15px; /* モーダル内も少し詰める */
    border-radius: 12px;
    border: 3px solid var(--border-color);
    text-align: center;
}

/* ★修正：ボタンの余白を少し詰める */
.action-btn {
    display: block; width: 100%;
    margin: 8px 0; padding:

/* --- style.css の一番下に追加 --- */

/* ゴールまとめ表示行のスタイル（優先順位を最強に設定） */
ul.player-list li.goal-summary-row {
    display: block !important; 
    padding: 8px 5px !important;
    font-size: 0.75em !important; /* rem から em に変更 */
    line-height: 1.4 !important; 
    color: var(--text-color) !important;
    background-color: rgba(0, 0, 0, 0.05) !important; 
    white-space: normal !important; 
    word-wrap: break-word !important;
    border-top: 2px dashed var(--border-color) !important; 
    cursor: default !important; 
}

[data-theme="dark"] ul.player-list li.goal-summary-row {
    background-color: rgba(255, 255, 255, 0.05) !important;
}