/* 全体の初期設定 */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

/* ヘッダー / フッター */
.site-header,
.site-footer {
    width: 100%;
    background-color: #4a4a5a;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}
.site-header .inner,
.site-footer .inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-header h1,
.site-footer p {
    margin: 0;
}

/* ───── PC では <span class="mobile-br"> を無効化 ───── */
.mobile-br { display: none; }

/* メイン .container (白いカード) */
.container {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 30px auto;
    text-align: center;
}

/* テーブルやボタンなど (PC 基準) */
.calc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}
th, td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: center;
    font-size: 17px;
    white-space: normal;
}
th {
    background-color: #4a4a4a;
    color: white;
    font-weight: bold;
}
input {
    width: 100%;
    padding: 6px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 17px;
    text-align: center;
}
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.selectable {
    cursor: pointer;
    background-color: #ddd;
    transition: background 0.3s;
    padding: 8px;
    margin: 0 2px;
}
.selectable:hover {
    background-color: #c0c0c0;
}
.selectable.active {
    background-color: #00CCFF;
    color: white;
}
.calc-button {
    width: 100%;
    padding: 12px;
    background: #00CCFF;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
    transition: background 0.3s;
}
.calc-button:hover {
    background: #0099CC;
}

h2, h3, h4 {
    color: #444;
    margin-top: 20px;
}
p.seo-description {
    font-size: 16px;
    font-weight: normal;
    color: #333;
    margin-bottom: 15px;
}
p {
    font-size: 18px;
    color: #333;
}

/* 使い方と複利メリット部分をシンプルに */
.usage-section h3 {
    font-size: 25px;
}
.usage-section,
.extra-info {
    text-align: left;
    margin-top: 100px;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}
.usage-section p,
.extra-info p {
    margin-bottom: 10px;
}
.extra-info h3,
.extra-info h4 {
    margin-top: 40px;
    font-weight: bold;
}
.link-free p {
    font-size: 13px;
    margin: 120px 0 20px;
    text-align: center;
}

/* フッター */
.site-footer p {
    color: #fff;
}

/* ───────── スマホサイズ (max-width:520px) ───────── */
@media (max-width: 520px) {

    /* ヘッダーを薄く & タイトルを小さく */
    .site-header {
        padding: 8px 0;
    }
    .site-header h1 {
        font-size: 18px;
        line-height: 1.25;
    }

    /* モバイルだけ改行を有効化 */
    .mobile-br { display: inline; }

    .container {
        margin: 10px auto;
        padding: 10px;
    }
    .calc-table {
        font-size: 14px;
        margin-bottom: 15px;
        display: block;
    }
    th, td,
    input,
    .selectable {
        padding: 5px;
        font-size: 16px;
    }
    .calc-button {
        padding: 8px;
        font-size: 16px;
    }
    h2, h3, h4 {
        margin-top: 10px;
        font-size: 16px;
    }
    p {
        font-size: 14px;
    }
    .usage-section,
    .extra-info {
        font-size: 14px;
        line-height: 1.5;
        margin-top: 20px;
    }

    /* ─── 2 行レイアウト化 ─── */
    .calc-table tr {
        display: flex;
        flex-wrap: wrap;
    }

    /* 枠線込み計算で幅を揃える */
    .calc-table tr th,
    .calc-table tr td {
        box-sizing: border-box;
        line-height: 16px;
    }

    .calc-table tr th {
        flex: 0 0 100%;
        border-right: none;
        text-align: left;
        padding: 10px 8px;  /* 上下 10px 左右 8px */
    }

    /* 入力欄：幅 38%（余裕を持たせてボタン3つを収める） */
    .calc-table tr td:first-of-type {
        flex: 0 0 38%;
        padding: 10px 4px;
        border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        margin: 0;
    }
    .calc-table tr td:first-of-type input {
        width: 100%;
        font-size: 16px;
        line-height: 16px;
        padding: 0;
    }

    /* 選択ボタン：残り 62% 均等・隙間なし */
    .calc-table tr td.selectable {
        flex: 1 1 0;
        min-width: 0;
        margin: 0;
        padding: 10px 0;
        background-color: #ddd;
    }
    .calc-table tr td.selectable:hover {
        background-color: #c0c0c0;
    }
    .calc-table tr td.selectable.active {
        background-color: #00CCFF;
        color: #fff;
    }
}
