#docx-counter-container {
    border: 1px solid #e0e0e0;
    padding: 2em;
    border-radius: 8px;
    background-color: #ffffff;
    max-width: 800px;
    margin: 2em auto;
}
#docx-counter-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5em;
}
.description-box {
    background-color: #f3f9ff;
    border: 1px solid #bce1ff;
    padding: 1em;
    margin-bottom: 1.5em;
    border-radius: 4px;
}
.description-box p {
    margin: 0;
    line-height: 1.5; /* 行間調整 */
}
.description-box .small-text {
    font-size: 0.9em;
    margin-top: 0.5em;
}

/* --- 2列レイアウト --- */
.file-upload-area {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    margin-bottom: 1.5em;
}
.file-upload-box {
    flex: 1 1 40%;
    min-width: 250px;
}
.file-upload-box > label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5em;
}
.file-input-hidden {
    display: none;
}
.file-select-button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    color: #333; /* 文字色を濃く */
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.file-select-button:hover {
    background-color: #e0e0e0;
}
.file-name-display {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2em;
}

/* --- 1列オプションエリア --- */
.form-options-area {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-bottom: 1em;
}
.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1em;
}
.form-row-label {
    font-weight: bold;
    flex-shrink: 0;
    width: 150px; /* ラベルの幅を固定 */
}
.form-row .inline-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1.5em; /* 上下左右の隙間 */
    align-items: center;
}
.form-row .inline-controls label {
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

p.description.small-text {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 1.5em;
}

#calculateButton {
    /* ...前回と同様... */
}

#result-container {
    margin-top: 1.5em;
    padding-top: 1.5em;
    border-top: 1px solid #e0e0e0;
}
#messageArea {
    padding: 12px 15px;
    border-radius: 4px;
    font-weight: 500;
    display: block;
    min-height: 1.5em;
}
#messageArea:empty {
    display: none;
}
#messageArea.error-message {
    color: #d9534f;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
}
#messageArea.info-message {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border: 1px solid #faebcc;
}

/* ...その他のスタイルは前回と同様... */