/* すごろくお金管理表 CSS */
#sugoroku-money-container {
    font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
    max-width: 640px; /* 800px → 640px (20%減) */
    margin: 16px auto; /* 20px → 16px */
    background: #00bcd4;
    padding: 16px; /* 20px → 16px */
    border-radius: 16px; /* 20px → 16px */
    box-sizing: border-box;
}

.sugoroku-setup-screen {
    background: white;
    border-radius: 16px; /* 20px → 16px */
    padding: 32px; /* 40px → 32px */
    text-align: center;
    box-shadow: 0 6.4px 16px rgba(0,0,0,0.2); /* 0 8px 20px → 0 6.4px 16px */
}

.sugoroku-setup-screen h2 {
    color: #333;
    font-size: 22.4px; /* 28px → 22.4px */
    margin-bottom: 12px; /* 15px → 12px */
}

.sugoroku-subtitle {
    color: #666;
    font-size: 12.8px; /* 16px → 12.8px */
    margin-bottom: 24px; /* 30px → 24px */
    font-weight: normal;
}

.sugoroku-setup-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px; /* 20px → 16px */
    margin-bottom: 24px; /* 30px → 24px */
    flex-wrap: wrap;
}

.sugoroku-setup-controls label {
    font-weight: bold;
    color: #333;
}

.sugoroku-setup-controls select {
    padding: 12px 16px; /* 15px 20px → 12px 16px */
    font-size: 14.4px; /* 18px → 14.4px */
    border: 2px solid #ddd;
    border-radius: 8px; /* 10px → 8px */
    background: white;
}

.sugoroku-start-button {
    background: #2196f3;
    color: white;
    border: none;
    padding: 12px 32px; /* 15px 40px → 12px 32px */
    font-size: 14.4px; /* 18px → 14.4px */
    border-radius: 8px; /* 10px → 8px */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sugoroku-start-button:hover {
    background: #1976d2;
}

.sugoroku-player-tabs {
    display: flex;
    margin-bottom: 0;
}

.sugoroku-player-tab {
    flex: 1;
    padding: 12px; /* 15px → 12px */
    border: none;
    font-size: 19.2px; /* 24px → 19.2px */
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 48px; /* 60px → 48px */
}

.sugoroku-player-tab.sugoroku-tab1 { background: #ffa726; }
.sugoroku-player-tab.sugoroku-tab2 { background: #ef5350; }
.sugoroku-player-tab.sugoroku-tab3 { background: #ab47bc; }
.sugoroku-player-tab.sugoroku-tab4 { background: #42a5f5; }
.sugoroku-player-tab.sugoroku-tab5 { background: #66bb6a; }
.sugoroku-player-tab.sugoroku-tab6 { background: #ff7043; }
.sugoroku-player-tab.sugoroku-tab7 { background: #26c6da; }
.sugoroku-player-tab.sugoroku-tab8 { background: #ff9800; }

.sugoroku-player-tab:first-child {
    border-top-left-radius: 8px; /* 10px → 8px */
}

.sugoroku-player-tab:last-child {
    border-top-right-radius: 8px; /* 10px → 8px */
}

.sugoroku-player-tab.active {
    transform: scale(1.05);
    z-index: 10;
    position: relative;
    box-shadow: 0 3.2px 6.4px rgba(0,0,0,0.2); /* 0 4px 8px → 0 3.2px 6.4px */
}

.sugoroku-game-panel {
    border-radius: 0 0 16px 16px; /* 0 0 20px 20px → 0 0 16px 16px */
    padding: 0;
    box-shadow: 0 6.4px 16px rgba(0,0,0,0.2); /* 0 8px 20px → 0 6.4px 16px */
}

.sugoroku-game-panel.sugoroku-panel1 { background: #ffa726; }
.sugoroku-game-panel.sugoroku-panel2 { background: #ef5350; }
.sugoroku-game-panel.sugoroku-panel3 { background: #ab47bc; }
.sugoroku-game-panel.sugoroku-panel4 { background: #42a5f5; }
.sugoroku-game-panel.sugoroku-panel5 { background: #66bb6a; }
.sugoroku-game-panel.sugoroku-panel6 { background: #ff7043; }
.sugoroku-game-panel.sugoroku-panel7 { background: #26c6da; }
.sugoroku-game-panel.sugoroku-panel8 { background: #ff9800; }

.sugoroku-player-info {
    color: white;
    text-align: center;
    padding: 12px; /* 15px → 12px */
    font-size: 19.2px; /* 24px → 19.2px */
    font-weight: bold;
}

.sugoroku-player-info.sugoroku-info1 { background: #ffa726; }
.sugoroku-player-info.sugoroku-info2 { background: #ef5350; }
.sugoroku-player-info.sugoroku-info3 { background: #ab47bc; }
.sugoroku-player-info.sugoroku-info4 { background: #42a5f5; }
.sugoroku-player-info.sugoroku-info5 { background: #66bb6a; }
.sugoroku-player-info.sugoroku-info6 { background: #ff7043; }
.sugoroku-player-info.sugoroku-info7 { background: #26c6da; }
.sugoroku-player-info.sugoroku-info8 { background: #ff9800; }

.sugoroku-content-area {
    background: #f5f5f5;
    padding: 24px; /* 30px → 24px */
    border-radius: 0 0 16px 16px; /* 0 0 20px 20px → 0 0 16px 16px */
}

.sugoroku-money-row, .sugoroku-input-row {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 20px; /* 25px → 20px */
    margin-bottom: 12px; /* 15px → 12px */
    padding: 8px 16px; /* 10px 20px → 8px 16px */
    box-shadow: 0 1.6px 8px rgba(0,0,0,0.1); /* 0 2px 10px → 0 1.6px 8px */
}

.sugoroku-money-icon, .sugoroku-plus-icon {
    width: 40px; /* 50px → 40px */
    height: 40px; /* 50px → 40px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px; /* 15px → 12px */
    font-size: 19.2px; /* 24px → 19.2px */
    color: white;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.sugoroku-money-icon {
    background: #ffa726;
}

.sugoroku-plus-icon {
    background: #2196f3;
}

.sugoroku-money-display, .sugoroku-input-display {
    flex: 1;
    text-align: right;
    font-size: 28.8px; /* 36px → 28.8px */
    font-weight: bold;
}

.sugoroku-money-display {
    color: #ff6b35;
}

.sugoroku-input-display {
    color: #999;
}

.sugoroku-button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px; /* 15px → 12px */
}

.sugoroku-calc-button {
    height: 64px; /* 80px → 64px */
    border: none;
    border-radius: 8px; /* 10px → 8px */
    font-size: 25.6px; /* 32px → 25.6px */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3.2px 6.4px rgba(0,0,0,0.2); /* 0 4px 8px → 0 3.2px 6.4px */
}

.sugoroku-calc-button:hover {
    transform: translateY(-1.6px); /* translateY(-2px) → translateY(-1.6px) */
    box-shadow: 0 4.8px 9.6px rgba(0,0,0,0.3); /* 0 6px 12px → 0 4.8px 9.6px */
}

.sugoroku-calc-button:active {
    transform: translateY(0);
    box-shadow: 0 1.6px 3.2px rgba(0,0,0,0.2); /* 0 2px 4px → 0 1.6px 3.2px */
}

.sugoroku-number-btn {
    background: #fff3c4;
    color: #333;
}

.sugoroku-number-btn:hover {
    background: #ffe082;
}

.sugoroku-action-btn-add {
    background: #2196f3;
    color: white;
    font-size: 14.4px; /* 18px → 14.4px */
}

.sugoroku-action-btn-add:hover {
    background: #1976d2;
}

.sugoroku-action-btn-subtract {
    background: #f44336;
    color: white;
    font-size: 14.4px; /* 18px → 14.4px */
}

.sugoroku-action-btn-subtract:hover {
    background: #d32f2f;
}

.sugoroku-action-btn-correct {
    background: #fff3c4;
    color: #333;
    font-size: 14.4px; /* 18px → 14.4px */
}

.sugoroku-action-btn-correct:hover {
    background: #ffe082;
}

.sugoroku-action-btn-confirm {
    background: #8bc34a;
    color: white;
    font-size: 14.4px; /* 18px → 14.4px */
}

.sugoroku-action-btn-confirm:hover {
    background: #689f38;
}

.sugoroku-summary-panel {
    background: white;
    margin-top: 16px; /* 20px → 16px */
    padding: 16px; /* 20px → 16px */
    border-radius: 12px; /* 15px → 12px */
    box-shadow: 0 3.2px 8px rgba(0,0,0,0.1); /* 0 4px 10px → 0 3.2px 8px */
}

.sugoroku-summary-title {
    text-align: center;
    font-size: 16px; /* 20px → 16px */
    font-weight: bold;
    color: #333;
    margin-bottom: 12px; /* 15px → 12px */
}

.sugoroku-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); /* minmax(120px, 1fr) → minmax(96px, 1fr) */
    gap: 8px; /* 10px → 8px */
}

.sugoroku-summary-item {
    text-align: center;
    padding: 8px; /* 10px → 8px */
    background: #f9f9f9;
    border-radius: 6.4px; /* 8px → 6.4px */
    transition: background-color 0.3s ease;
}

.sugoroku-summary-item:hover {
    background: #f0f0f0;
}

.sugoroku-summary-player {
    font-weight: bold;
    color: #666;
    margin-bottom: 4px; /* 5px → 4px */
    font-size: 11.2px; /* 14px → 11.2px */
}

.sugoroku-summary-money {
    font-size: 12.8px; /* 16px → 12.8px */
    font-weight: bold;
}

.sugoroku-positive { 
    color: #4caf50; 
}

.sugoroku-negative { 
    color: #f44336; 
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    #sugoroku-money-container {
        margin: 8px; /* 10px → 8px */
        padding: 12px; /* 15px → 12px */
    }
    
    .sugoroku-player-tab {
        font-size: 14.4px; /* 18px → 14.4px */
        padding: 8px 4px; /* 10px 5px → 8px 4px */
        min-width: 32px; /* 40px → 32px */
    }
    
    .sugoroku-money-display, .sugoroku-input-display {
        font-size: 19.2px; /* 24px → 19.2px */
    }
    
    .sugoroku-calc-button {
        height: 48px; /* 60px → 48px */
        font-size: 16px; /* 20px → 16px */
    }
    
    .sugoroku-button-grid {
        gap: 6.4px; /* 8px → 6.4px */
    }
    
    .sugoroku-content-area {
        padding: 16px; /* 20px → 16px */
    }
    
    .sugoroku-setup-controls {
        flex-direction: column;
        gap: 12px; /* 15px → 12px */
    }
    
    .sugoroku-setup-screen {
        padding: 24px 16px; /* 30px 20px → 24px 16px */
    }
    
    .sugoroku-setup-screen h2 {
        font-size: 19.2px; /* 24px → 19.2px */
    }
}

@media (max-width: 480px) {
    .sugoroku-player-tab {
        font-size: 12.8px; /* 16px → 12.8px */
        padding: 6.4px 2.4px; /* 8px 3px → 6.4px 2.4px */
    }
    
    .sugoroku-calc-button {
        height: 40px; /* 50px → 40px */
        font-size: 12.8px; /* 16px → 12.8px */
    }
    
    .sugoroku-money-display, .sugoroku-input-display {
        font-size: 16px; /* 20px → 16px */
    }
    
    .sugoroku-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* minmax(100px, 1fr) → minmax(80px, 1fr) */
    }
}

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

#sugoroku-game-area {
    animation: sugorokuFadeIn 0.5s ease-out;
}

/* アクセシビリティ */
.sugoroku-calc-button:focus,
.sugoroku-start-button:focus,
.sugoroku-player-tab:focus {
    outline: 3px solid #2196f3;
    outline-offset: 2px;
}

/* 印刷用スタイル */
@media print {
    #sugoroku-money-container {
        background: white;
        box-shadow: none;
    }
    
    .sugoroku-calc-button,
    .sugoroku-start-button {
        display: none;
    }
}