/* =====================================================================
   Creca Survey — フロントエンド CSS
   ===================================================================== */
.cs-wrap code {
	display: block !important;
	padding: 0 !important;
	margin: 0 !important;
}
/* ---- ラッパー ---- */
.cs-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', sans-serif;
    max-width: 680px;
    margin: 2em auto;
    border: 1px solid #e0e6f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(34, 113, 177, .10);
    background: #fff;
}

/* ---- ヘッダー ---- */
.cs-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px 18px;
    background: linear-gradient(135deg, #1a4fa0 0%, #2271b1 100%);
    color: #fff;
}
.cs-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.cs-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
}
.cs-desc {
    font-size: 12px;
    opacity: .85;
    line-height: 1.5;
}

/* ---- 回答済みバナー ---- */
.cs-answered-notice {
    background: #eaf4e8;
    color: #276131;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-bottom: 1px solid #c6e8c6;
}

/* ---- フォーム全体 ---- */
.cs-form { padding: 20px 24px 0; }

/* ---- 1設問ブロック ---- */
.cs-question {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f3f8;
}
.cs-question:last-of-type { border-bottom: none; }

.cs-q-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.cs-q-body { flex: 1; min-width: 0; }

.cs-q-text {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.cs-required {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    background: #d63638;
    color: #fff;
    padding: 1px 6px;
    border-radius: 20px;
    margin-top: 3px;
}
.cs-optional {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    background: #ddd;
    color: #666;
    padding: 1px 6px;
    border-radius: 20px;
    margin-top: 3px;
}

/* ---- 選択肢 ---- */
.cs-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 9px 14px;
    border: 1.5px solid #e0e6f0;
    border-radius: 8px;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.cs-choice:hover { border-color: #2271b1; background: #f0f6fc; }
.cs-choice input[type="radio"],
.cs-choice input[type="checkbox"] { display: none; }

/* カスタムラジオ */
.cs-radio-box, .cs-check-box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #c3c4c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
    position: relative;
}
.cs-check-box { border-radius: 4px; }

.cs-choice input[type="radio"]:checked  ~ .cs-radio-box,
.cs-choice input[type="checkbox"]:checked ~ .cs-check-box {
    border-color: #2271b1;
    background: #2271b1;
}
.cs-choice input[type="radio"]:checked  ~ .cs-radio-box::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
.cs-choice input[type="checkbox"]:checked ~ .cs-check-box::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.cs-choice input:checked ~ .cs-choice-label { color: #1a4fa0; font-weight: 600; }
.cs-choice:has(input:checked) { border-color: #2271b1; background: #f0f6fc; }

.cs-choice-label { font-size: 13px; color: #333; line-height: 1.4; }

/* テキストエリア */
.cs-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e0e6f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color .15s;
}
.cs-textarea:focus { border-color: #2271b1; outline: none; }

/* セレクト */
.cs-select {
    width: 100%;
    border: 1.5px solid #e0e6f0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* ---- 送信ボタン ---- */
.cs-submit-row {
    padding: 4px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cs-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 40px;
    background: linear-gradient(135deg, #1a4fa0, #2271b1);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    min-width: 200px;
    box-shadow: 0 3px 12px rgba(34,113,177,.4);
}
.cs-submit-btn:hover  { opacity: .9; }
.cs-submit-btn:active { transform: scale(.98); }
.cs-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.cs-privacy-note {
    font-size: 11px;
    color: #aaa;
}

/* ---- メッセージ ---- */
.cs-message {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}
.cs-message.cs-success { background: #eaf4e8; color: #276131; border: 1px solid #c6e8c6; }
.cs-message.cs-error   { background: #fde8e8; color: #9e2323; border: 1px solid #f5c6c6; }

/* ---- 結果エリア ---- */
.cs-results { padding: 20px 24px 0; }
.cs-results-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a4fa0;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e6f0;
}

.cs-result-block { margin-bottom: 22px; }
.cs-result-q {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
}

.cs-result-bars { display: flex; flex-direction: column; gap: 8px; }

.cs-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cs-bar-label {
    width: 160px;
    flex-shrink: 0;
    font-size: 12px;
    color: #444;
    line-height: 1.3;
}
.cs-bar-track {
    flex: 1;
    height: 16px;
    background: #f0f3f8;
    border-radius: 20px;
    overflow: hidden;
}
.cs-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #4a9ede);
    border-radius: 20px;
    transition: width .6s ease;
}
.cs-bar-pct {
    width: 70px;
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: #2271b1;
}
.cs-bar-count { font-size: 10px; color: #999; font-weight: 400; }

/* ---- フッター ---- */
.cs-footer {
    padding: 12px 24px;
    background: #f6f8fb;
    border-top: 1px solid #e8ecf2;
    font-size: 12px;
    color: #888;
    text-align: right;
}
.cs-footer strong { color: #2271b1; }

/* ---- レスポンシブ ---- */
@media (max-width: 480px) {
    .cs-header { padding: 16px 16px 14px; }
    .cs-form   { padding: 16px 16px 0; }
    .cs-results { padding: 16px 16px 0; }
    .cs-bar-label { width: 100px; font-size: 11px; }
    .cs-bar-pct { width: 60px; font-size: 11px; }
    .cs-question { gap: 10px; }
    .cs-choice { padding: 8px 10px; }
    .cs-submit-btn { padding: 12px 28px; font-size: 14px; }
}