/* ── リセット ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "MS PGothic", "ＭＳ Ｐゴシック", "Hiragino Kaku Gothic ProN",
                 Meiryo, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.6;
    font-weight: bold;
}

/* ── ページ全体 ── */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 20px 40px;
}

/* ── ページヘッダー（タイトル＋ロゴ） ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #000;
    margin-bottom: 16px;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    flex: 1;
    text-align: center;
}

.page-logo img {
    height: 40px;
    width: auto;
}

/* ── セクション ── */
.section {
    margin-bottom: 8px;
}

.section h2 {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 8px;
    margin-top: 16px;
}

/* ── フォームグループ ── */
.form-group {
    margin-bottom: 12px;
}

.form-group > label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

input[type="text"] {
    padding: 4px 6px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #999;
    width: 180px;
    max-width: 100%;
}

input[type="text"]:focus {
    outline: 1px solid #333;
}

/* ── 必須・任意ラベル ── */
.required {
    color: #c00;
    font-weight: bold;
}

.optional {
    color: #666;
    font-size: 15px;
}

/* ── 質問グループ（fieldset） ── */
.question-group {
    border: none;
    margin-bottom: 10px;
    padding: 0;
}

.question-group legend {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.sub-question {
    margin-left: 8px;
    margin-top: 2px;
    padding: 0;
    background: none;
    border-radius: 0;
}

.sub-question legend {
    font-size: 15px;
    color: #000;
}

/* ── ラジオボタン（クリック範囲＝ボタン部分のみ） ── */
.radio-item {
    display: flex;
    align-items: center;
    padding: 2px 0;
    margin-left: 16px;
}

.radio-item input[type="radio"] {
    margin-right: 6px;
    vertical-align: middle;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-item label {
    vertical-align: middle;
    font-size: 16px;
    font-weight: bold;
    cursor: default;
    user-select: none;
}

/* ── チェックボックス（クリック範囲＝ボックス部分のみ） ── */
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 2px 0;
    margin-left: 16px;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 6px;
    vertical-align: middle;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-item label {
    vertical-align: middle;
    font-size: 16px;
    font-weight: bold;
    cursor: default;
    user-select: none;
}

/* ── テキストエリア ── */
textarea {
    width: 100%;
    padding: 4px 6px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #999;
    resize: none;
    line-height: 1.6;
}

textarea:focus {
    outline: 1px solid #333;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

.caution {
    color: #c00;
    font-size: 15px;
    margin-bottom: 4px;
    text-decoration: underline;
}

.example-text {
    font-size: 16px;
    color: #666;
    white-space: nowrap;
}

/* ── エラーメッセージ ── */
.error-msg {
    color: #c00;
    font-size: 15px;
    display: block;
}

.error-msg:empty {
    display: none;
}

.global-error {
    text-align: center;
    font-size: 16px;
    margin-bottom: 8px;
}

/* ── 送信セクション ── */
.submit-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
}

.submit-note {
    font-size: 15px;
    color: #000;
    margin-bottom: 2px;
}

.btn-submit {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 40px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    color: #000;
    background: #ddd;
    border: 1px solid #999;
    cursor: pointer;
}

.btn-submit:hover {
    background: #ccc;
}

/* ── メッセージ画面（完了・期限切れ） ── */
.message-section {
    margin-top: 20px;
}

.message-box {
    border: 1px solid #999;
    padding: 20px;
    text-align: center;
}

.message-box p {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.8;
    margin-bottom: 4px;
}

/* ── レスポンシブ ── */
@media (max-width: 600px) {
    .container {
        padding: 8px 12px 30px;
    }

    input[type="text"] {
        width: 100%;
    }

    .page-header {
        flex-direction: column-reverse;
        align-items: flex-end;
    }

    .page-title {
        align-self: flex-start;
        margin-top: 8px;
    }

    .btn-submit {
        width: 80%;
        padding: 8px 20px;
    }
}
