/* --- 基本設定 (参考CSSより流用・調整) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4; /* ニュートラル: オフホワイト (背景) */
    color: #333333; /* ニュートラル: ダークグレー (基本テキスト) */
    display: flex;
    flex-direction: column; /* Header, Container, Footerを縦積み */
    align-items: center; /* 中央寄せ */
    min-height: 100vh;
    margin: 0;
    padding: 0; /* bodyのpaddingを削除 */
}

/* --- Page Header Style --- */
.site-header {
    width: 100%;
    background-color: #ffffff; /* ホワイト背景 */
    color: #333333; 
    padding-top: 15px;
    padding-bottom: 15px; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
    position: sticky; /* スクロール時に追従 */
    top: 0;
    z-index: 100; 
}
.header-content {
    width: 95%;
    max-width: 700px; /* メインコンテナの幅に合わせる */
    margin: 0 auto;
}
.site-header h1 {
    margin: 0;
    font-size: 1.8em;
    color: #1abc9c; /* ブライトミント */
}
.site-header .subtitle {
    color: #7f8c8d; /* ライトグレー */
    margin: 0;
    font-size: 1em;
}

/* --- メインコンテナ --- */
.container {
    background-color: #ffffff; /* ニュートラル: ホワイト (メインコンテナ) */
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 700px; 
    margin: 0 auto 20px auto; 
    box-sizing: border-box;
}

/* --- パンくずリスト (コンテナ内へ移動・調整) --- */
.breadcrumbs {
    width: 100%;
    background-color: transparent; /* コンテナ内なので背景透明 */
    padding: 0 0 15px 0; /* 下に余白 */
    margin-bottom: 0;
}
.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.85em;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin: 0 8px;
    color: #7f8c8d; /* ライトグレー */
}
.breadcrumbs a {
    text-decoration: none;
    color: #7f8c8d; /* ライトグレー */
    transition: color 0.3s;
}
.breadcrumbs a:hover {
    color: #1abc9c; /* ホバー時はプライマリカラー */
    text-decoration: underline;
}
.breadcrumbs li span[aria-current="page"] {
    color: #7f8c8d; 
    font-weight: normal; 
}


/* --- タブUI (変更なし) --- */
.tab-navigation {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #dddddd;
}
.tab-btn {
    font-family: inherit;
    font-size: 1em;
    font-weight: bold;
    color: #7f8c8d; /* ニュートラル: ライトグレー */
    background-color: transparent;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
    margin-bottom: -2px; /* ボーダー分持ち上げる */
}
.tab-btn:hover {
    color: #34495e; /* ニュートラル: スレートブルー */
}
.tab-btn.active {
    color: #16a085; /* プライマリ: ダークミント */
    border-bottom-color: #16a085;
}

.tab-content {
    display: none; /* JSで制御 */
}
.tab-content.active {
    display: block;
}

/* --- フォーム・コントロール (変更なし) --- */
.simulator-wrapper {
    background-color: #f8f9fa; /* ニュートラル: オフホワイト */
    padding: 20px;
    border-radius: 8px;
}
.simulator-wrapper h2 {
    font-size: 1.5em;
    color: #34495e; /* ニュートラル: スレートブルー */
    border-left: 5px solid #16a085; /* プライマリ: ダークミント */
    padding-left: 10px;
    margin: 0 0 10px 0;
}
.simulator-description {
    font-size: 0.9em;
    color: #555555;
    margin: 0 0 20px 0;
}

.simulator-form .form-group {
    margin-bottom: 15px;
}
.simulator-form .form-group label {
    display: block;
    font-weight: bold;
    color: #555555; /* ニュートラル: ミドルグレー */
    margin-bottom: 5px;
}
.simulator-form input[type="text"],
.simulator-form input[type="number"],
.simulator-form input[type="date"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #dddddd; /* ニュートラル: ボーダーグレー */
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box; 
    font-family: inherit;
}
.simulator-form input[type="date"]:invalid {
    color: #7f8c8d;
}

/* 横並び */
.simulator-form .form-row {
    display: flex;
    gap: 15px;
}
.simulator-form .form-row .form-group {
    flex: 1; 
}

/* 時間・分 入力 */
.time-input-row {
    gap: 10px;
}
.form-group-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.form-group-inline input[type="number"] {
    flex: 1;
    min-width: 60px;
}
.form-group-inline .inline-label {
    margin-bottom: 0; 
    font-weight: normal;
    color: #333333;
    white-space: nowrap;
}

/* ボタン */
.main-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    box-sizing: border-box;
    background-color: #1abc9c; /* プライマリ: ブライトミント */
    color: #ffffff; /* ニュートラル: ホワイト */
    margin-top: 10px;
}
.main-btn:hover {
    background-color: #16a085; /* プライマリ: ダークミント */
}

.hidden {
    display: none !important;
}

/* --- 結果表示エリア (変更なし) --- */
.result-area {
    margin-top: 25px;
    padding: 20px;
    background-color: #34495e; /* ニュートラル: スレートブルー (メイン背景) */
    color: #e8f8f5; /* プライマリ: ライトミント (基本テキスト) */
    border-radius: 8px;
}
.result-area h3 {
    color: #ffffff;
    font-size: 1.3em;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #2c3e50;
    padding-bottom: 10px;
}
.result-area .note {
    font-size: 0.85em;
    color: #95a5a6; /* セマンティック: アッシュグレー */
    background-color: #2c3e50;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Sim1: メインディスプレイ */
.result-main-display {
    text-align: center;
    background-color: #2c3e50;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}
.result-main-display .label {
    display: block;
    font-size: 0.9em;
    color: #95a5a6; 
}
.result-main-display .value {
    font-family: 'monospace';
    font-size: 2.8em;
    font-weight: bold;
    color: #1abc9c; 
    line-height: 1.1;
    margin: 0 5px;
}
.result-main-display .unit {
    font-size: 1.2em;
    color: #e8f8f5;
}
.result-main-display .sub-value {
    display: block;
    font-size: 1.0em;
    color: #7f8c8d; 
    margin-top: 5px;
}

/* Sim1: マイルストーン */
.result-milestones h4 {
    color: #e8f8f5;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}
.result-milestones p {
    font-family: 'monospace';
    font-size: 1.0em;
    margin: 5px 0;
}
.result-milestones p strong {
    color: #1abc9c; 
}
.result-milestones p .sub-value {
    display: inline;
    font-size: 0.9em;
    color: #7f8c8d; 
    margin-left: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
}

/* Sim2, Sim3: テーブル */
.result-table-container {
    overflow-x: auto; 
}
.result-table {
    width: 100%;
    border-collapse: collapse;
    color: #e8f8f5;
}
.result-table th,
.result-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #34495e;
    vertical-align: baseline; 
}
.result-table th {
    background-color: #2c3e50; 
    color: #ffffff;
    font-size: 0.9em;
}
.result-table tbody tr:nth-child(odd) {
    background-color: rgba(44, 62, 80, 0.5); 
}
.result-table td:first-child {
    font-weight: bold;
    color: #1abc9c; 
    width: 30%; 
}
#simulator2 .result-table td:nth-child(2),
#simulator3 .result-table td:nth-child(2) {
    font-family: 'monospace';
    font-size: 1.1em;
    font-weight: bold;
    width: 70%; 
}
.result-table td .sub-value {
    display: inline-block;
    font-size: 0.8em; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #7f8c8d; 
    font-weight: normal;
    margin-left: 8px;
}

/* --- [新規] ご利用上の注意 (Body下部) --- */
.usage-notice {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dddddd; /* ボーダーグレー */
}
.usage-notice h3 {
    font-size: 1.1em;
    color: #34495e; /* スレートブルー */
    margin: 0 0 10px 0;
}
.usage-notice ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.usage-notice li {
    font-size: 0.85em;
    color: #555555; /* ミドルグレー */
    margin-bottom: 5px;
    padding-left: 1em;
    position: relative;
    line-height: 1.5;
}
.usage-notice li::before {
    content: "・";
    position: absolute;
    left: 0;
}

/* --- Page Footer Style --- */
.page-footer {
    width: 100%;
    background-color: #34495e; /* スレートブルー */
    color: #ddd;
    padding: 30px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    margin-top: auto; 
}
.footer-content {
    max-width: 700px;
    width: 95%;
    margin: 0 auto; 
    padding: 0 10px;
    box-sizing: border-box;
}

/* Footer カラムレイアウト (Flexbox) */
.footer-columns {
    display: flex;
    justify-content: flex-start; /* 左寄せ */
    gap: 40px; /* カラム間の余白 */
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #556c80; /* 下線 */
}
.footer-section {
    /* マージン等は削除しFlexGapに任せる */
    margin: 0;
    padding: 0;
    border: none;
}
.footer-section .section-title {
    font-size: 1.0em;
    font-weight: bold;
    color: #1abc9c; /* ブライトミント */
    margin: 0 0 10px 0;
}
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-section li {
    margin-bottom: 5px;
}
.footer-section li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}
.footer-section li a:hover {
    color: #fff;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    font-size: 0.8em;
    color: #95a5a6;
    margin: 0;
    padding: 0;
}


/* --- レスポンシブ対応 --- */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    .footer-content { 
        width: 100%; 
        padding: 0 15px; 
    }

    /* Footer: スマホでは縦並び */
    .footer-columns {
        flex-direction: column;
        gap: 20px;
    }

    .site-header h1 { font-size: 1.8em; }

    /* フォーム */
    .simulator-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    .simulator-form .form-row .form-group {
        margin-bottom: 15px;
    }
    .simulator-form .form-row.time-input-row {
        flex-direction: row; 
        gap: 10px;
    }
    #sim2-form .form-row {
        flex-direction: row;
        gap: 10px;
    }

    /* タブ */
    .tab-navigation {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .tab-btn {
        padding: 10px;
        font-size: 0.9em;
    }

    /* Sim1: メインディスプレイ */
    .result-main-display .value {
        font-size: 2.2em;
    }
    .result-milestones p .sub-value {
        display: block; 
        margin-left: 10px;
        margin-top: 2px;
    }

    /* テーブル */
    .result-table td:first-child,
    #simulator2 .result-table td:nth-child(2),
    #simulator3 .result-table td:nth-child(2) {
        width: auto; 
    }
    
    .result-table td .sub-value {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}