/* 既存サイトへの干渉を防ぐため、ユニークなID内でスタイルをカプセル化 */
#simulation-section {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    background-color: #fcf9f2;
    color: #5d3e17;
    padding: 80px 20px;
    border-radius: 30px;
    max-width: 1100px;
    margin: 60px auto;
    box-shadow: 0 15px 40px rgba(93, 62, 23, 0.1);
    position: relative;
    overflow: hidden;
}



#simulation-section .section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    font-weight: 700;
    color: #5d3e17;
}

#simulation-section .section-title span {
    display: inline-block;
    border-bottom: 4px solid #eab320;
    padding-bottom: 12px;
}

/* レイアウト */
#simulation-section .sim-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch; /* カードの高さを揃える */
}

@media (max-width: 992px) {
    #simulation-section .sim-grid {
        grid-template-columns: 1fr;
    }
}

/* 入力エリア */
#simulation-section .input-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    border: 3px solid #eab320;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#simulation-section .input-group {
    margin-bottom: 25px;
}

#simulation-section .input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 20px;
}

#simulation-section .input-wrapper {
    display: flex;
    align-items: center;
}

#simulation-section input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 22px;
    color: #5d3e17;
    text-align: right;
    font-weight: 700;
}

#simulation-section .unit {
    margin-left: 15px;
    font-weight: 700;
    font-size: 20px;
    width: 80px;
}

/* シミュレーションボタン */
#simulation-section .sim-btn-wrapper {
    margin-top: 30px;
}

#simulation-section #sim-execute-btn {
    width: 100%;
    background-color: #5d3e17;
    color: #ffffff;
    border: none;
    padding: 22px;
    border-radius: 60px;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(93, 62, 23, 0.3);
}

#simulation-section #sim-execute-btn:hover {
    background-color: #eab320;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(234, 179, 32, 0.4);
}

/* 結果エリア */
#simulation-section .result-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#simulation-section .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px dotted #eee;
}

#simulation-section .result-label {
    font-size: 22px;
    font-weight: 700;
}

#simulation-section .result-value {
    font-weight: 700;
    font-size: 28px;
}

/* 合計損失額 */
#simulation-section .total-display {
    text-align: center;
}

#simulation-section .total-box {
    background: #fdf2f2;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #ffcccc;
}

#simulation-section .total-label {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

#simulation-section .total-amount {
    font-size: 48px;
    font-weight: 700;
    color: #d0021b;
    line-height: 1;
}

#simulation-section .total-unit {
    font-size: 22px;
    color: #d0021b;
    margin-left: 8px;
    font-weight: 700;
}

/* 動的メッセージエリア (右側カード内に移動) */
#simulation-section #dynamic-message {
    margin-top: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 40px; /* 2行に収めるため少し調整 */
    color: #d0021b;
    min-height: 100px;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
}

#simulation-section #dynamic-message.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 576px) {
    #simulation-section #dynamic-message {
        font-size: 32px;
        min-height: 80px;
    }
}

/* 補足 */
#simulation-section .disclaimer {
    font-size: 18px;
    color: #777;
    text-align: center;
    line-height: 1.8;
    margin-top: 40px;
}

/* アニメーション */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.pulse-once {
    animation: pulse 0.5s ease;
}
/* 新規：コストシミュレーター用スタイル */
.cost-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.cost-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    border-top: 5px solid #eab320;
}

.cost-card h3 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: #5d3e17;
    border-bottom: 2px solid #fcf9f2;
    padding-bottom: 10px;
}

.table-input {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
    color: #5d3e17;
}

.table-input th, .table-input td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

.table-input th {
    background-color: #5d3e17;
    color: #ffffff;
    text-align: left;
    font-weight: 700;
}

.table-input tbody tr:nth-child(even) {
    background-color: #fcf9f2;
}

.table-input .col-unit { width: 120px; text-align: right; }
.table-input .col-qty { width: 100px; }
.table-input .col-price { width: 150px; text-align: right; }

.qty-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: right;
    font-size: 18px;
    transition: all 0.2s ease;
}

.qty-input[readonly] {
    border-color: transparent;
    background-color: transparent;
    padding-right: 0;
    pointer-events: none;
    -moz-appearance: textfield;
    appearance: none;
}

/* スピンボタン（上下矢印）を非表示にする */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cost-summary {
    margin-top: 20px;
    text-align: right;
    font-size: 20px;
    font-weight: 700;
}

.cost-summary .total-val {
    font-size: 28px;
    color: #d0021b;
    margin-left: 10px;
}

/* 5年間推移表 */
.transition-section {
    margin-top: 60px;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.transition-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 20px;
    color: #5d3e17;
}

.transition-table th, .transition-table td {
    padding: 20px;
    border: 1px solid #eee;
    text-align: center;
}

.transition-table th {
    background-color: #5d3e17;
    color: #ffffff;
}

.transition-table tr:nth-child(even) {
    background-color: #fcf9f2;
}

.cumulative-row {
    font-weight: 700;
    color: #d0021b;
}

@media (max-width: 992px) {
    .cost-grid { grid-template-columns: 1fr; }
    .transition-table { font-size: 16px; }
    .transition-table th, .transition-table td { padding: 10px; }
}

/* 月間収支シミュレーション（和モダントンマナ統一） */
#cashflow-section {
    background-color: #fcf9f2;
    padding: 80px 20px;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

.cashflow-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    padding: 50px 40px;
}

.cashflow-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: #5d3e17;
    margin-bottom: 12px;
    padding-bottom: 16px;
}

.cashflow-title span {
    display: inline-block;
    border-bottom: 4px solid #eab320;
    padding-bottom: 12px;
}

.cashflow-title-sub {
    font-size: 26px;
    color: #eab320;
}

.cashflow-desc {
    font-size: 18px;
    color: #777;
    text-align: center;
    margin-bottom: 40px;
}

.cashflow-alert {
    background-color: #fff8e6;
    border: 2px solid #eab320;
    color: #5d3e17;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.cashflow-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
    color: #5d3e17;
    margin-bottom: 30px;
}

.cashflow-table thead tr {
    background-color: #5d3e17;
}

.cashflow-table th {
    padding: 18px 20px;
    text-align: left;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.cashflow-amount-col {
    text-align: right;
    min-width: 200px;
}

.cashflow-table tbody tr {
    border-bottom: 1px solid #eee;
    background-color: #ffffff;
}

.cashflow-table tbody tr:nth-child(even) {
    background-color: #fcf9f2;
}

.cashflow-item-label {
    font-weight: 700;
    font-size: 20px;
    padding: 20px;
    white-space: nowrap;
}

.cashflow-item-desc {
    padding: 20px;
    color: #888;
    font-size: 17px;
}

.cashflow-item-desc small {
    font-size: 14px;
    color: #aaa;
}

.cashflow-amount {
    padding: 20px;
    text-align: right;
    font-size: 22px;
    font-weight: 700;
}

.cashflow-amount.negative { color: #d0021b; }
.cashflow-amount.positive { color: #1a7a3c; }

.cashflow-total-row {
    background-color: #fcf9f2 !important;
    border-top: 3px solid #eab320 !important;
}

.cashflow-total-row td {
    padding: 24px 20px;
    font-size: 22px;
    font-weight: 700;
    color: #5d3e17;
}

.cashflow-total-amount {
    text-align: right;
    font-size: 32px;
    font-weight: 700;
    color: #1a7a3c;
}

.cashflow-annual {
    text-align: center;
    font-size: 20px;
    color: #777;
    margin-top: 20px;
}

.cashflow-annual-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a7a3c;
}

#cashflow-execute-btn {
    background-color: #5d3e17;
    color: #ffffff;
    border: none;
    padding: 22px 50px;
    border-radius: 60px;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(93, 62, 23, 0.3);
}

#cashflow-execute-btn:hover {
    background-color: #eab320;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(234, 179, 32, 0.4);
}

@media (max-width: 768px) {
    .cashflow-container { padding: 30px 20px; }
    .cashflow-title { font-size: 26px; }
    .cashflow-title-sub { font-size: 20px; }
    .cashflow-item-desc { display: none; }
    .cashflow-amount { font-size: 18px; }
    .cashflow-total-amount { font-size: 24px; }
}


