html {
	height: 100%;
}

body {
	height: 100%;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	background: #f0f4f8;
	color: #333;
	margin: 0;
}

main {
	padding: 20px;
}

.login-container {
	max-width: 400px;
	margin: 40px auto 0 auto;
	background: #fff;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
}

.clinic-info {
	text-align: center;
	font-size: 14px;
	color: #64748b;
	font-weight: bold;
	margin-bottom: 5px;
}

h1 {
	font-size: 20px;
	text-align: center;
	color: #1e293b;
	margin-top: 0;
	margin-bottom: 20px;
	font-weight: bold;
}

.type-badge {
	display: block;
	text-align: center;
	padding: 10px;
	border-radius: 6px;
	font-weight: bold;
	margin-bottom: 25px;
	font-size: 15px;
	background: #e6f0ff;
	color: #0056b3;
}

.form-group {
	margin-bottom: 20px;
}

label {
	display: block;
	font-weight: bold;
	margin-bottom: 8px;
	font-size: 14px;
}

.error-txt {
	color: #dc3545;
	font-size: 14px;
	margin-bottom: 15px;
	font-weight: bold;
	text-align: center;
	display: none;
}

/* ボタンの色も選択された問診タイプに合わせて自動変化 */
button {
	background: #0056b3;
	color: #fff;
	border: none;
	padding: 14px;
	width: 100%;
	border-radius: 8px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:active {
	filter: brightness(0.8);
}

.sub-btn {
	display: block;
	text-align: center;
	box-sizing: border-box;
	width: 100%;
	padding: 12px;
	border: 2px solid #cbd5e1; /* 目立ちすぎないライトグレーの枠線 */
	background: #fff;
	color: #64748b; /* 文字色も少し控えめに */
	border-radius: 8px;
	font-size: 14px;
	font-weight: bold;
	text-decoration: none; /* 下線を消す */
	transition: all 0.2s;
}
/* スマホでタップされた時・マウスホバー時の反応 */
.sub-btn:active,
.sub-btn:hover {
	background: #f8fafc;
	border-color: #94a3b8;
	color: #334155;
}

.guide-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 12px;
	border-radius: 6px;
	margin-top: 25px;
	font-size: 13px;
	color: #64748b;
}

footer {
	position: -webkit-sticky; /* Safari対応 */
	position: sticky;
	width: 100%;
	padding: 4px 0;
	top: 100vh;
}

#footer_content {
	font-size: 0.8rem;
	text-align: center;
}

.container {
	/* max-width: 500px; */
	min-width: 300px;
	background: #fff;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	margin: 0 auto;
	box-sizing: border-box;
}

/* クリニック情報エリア */
.clinic-header {
	background: #eef4fc;
	padding: 15px;
	border-radius: 8px;
	margin-bottom: 20px;
	border-left: 5px solid #0056b3;
}

.clinic-title {
	font-size: 16px;
	font-weight: bold;
	color: #0056b3;
	margin: 0 0 8px 0;
}

.patient-info {
	font-size: 13px;
	color: #555;
	margin: 0;
	line-height: 1.5;
}

/* 注意事項エリア */
.notice-box {
	background: #fff9e6;
	border: 1px solid #ffeeba;
	padding: 15px;
	border-radius: 8px;
	margin-bottom: 25px;
}

.notice-title {
	font-size: 14px;
	font-weight: bold;
	color: #856404;
	margin: 0 0 6px 0;
	display: flex;
	align-items: center;
}

.notice-text {
	font-size: 13px;
	color: #66511a;
	margin: 0;
	padding-left: 18px;
	line-height: 1.6;
}

h2 {
	font-size: 18px;
	text-align: center;
	color: #333;
	margin: 10px 0 20px 0;
	font-weight: bold;
}

label.group-title {
	display: block;
	font-weight: bold;
	margin-bottom: 12px;
	font-size: 15px;
	color: #111;
	line-height: 1.4;
}

.q-number {
	color: #007bff;
	font-size: 16px;
	margin-right: 4px;
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #bcc8d4;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 16px;
	background: #fdfdfd;
}
input[readonly] {
	background: #f0f0f0;
	color: #666;
	cursor: not-allowed;
	border-color: #dcdcdc;
}

/* 単位付き入力欄のラッパー */
.input-with-unit {
	display: flex;
	align-items: center;
	gap: 8px;
}
.input-with-unit input {
	flex: 1;
}
.unit-text {
	font-size: 15px;
	font-weight: bold;
	color: #475569;
}

/* 【ラジオボタン】ボタン風デザイン（縦並び） */
.radio-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.radio-label {
	display: flex;
	align-items: center;
	padding: 10px;
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	font-size: 15px;
	transition: all 0.2s;
	-webkit-tap-highlight-color: transparent;
}
.radio-label input[type="radio"] {
	width: 20px;
	height: 20px;
	margin-right: 12px;
	flex-shrink: 0;
	cursor: pointer;
}
/* ラジオボタン選択時の色変化（一般なら青、発達なら赤） */
.radio-label:has(input[type="radio"]:checked) {
	/* border-color: <?php echo $monshin_type === '発達外来' ? '#dc2626' : '#007bff'; ?>; 
            background: <?php echo $monshin_type === '発達外来' ? '#ffe6e6' : '#f0f7ff'; ?>;  */
	border-color: #007bff;
	background: #f0f7ff;
	font-weight: bold;
}

/* 【セレクトボックス】スマホ対応矢印付きデザイン */
.select-wrapper {
	position: relative;
	width: 100%;
}
.custom-select {
	width: 100%;
	padding: 10px 40px 10px 12px;
	border: 1px solid #bcc8d4;
	border-radius: 6px;
	font-size: 16px;
	background: #fdfdfd;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	color: #333;
}
/* 下向き矢印アイコンをCSSで再現 */
.select-wrapper::after {
	content: "";
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid #64748b;
	pointer-events: none;
}
.custom-select:focus {
	border-color: #007bff;
	outline: none;
}

.checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.checkbox-label {
	display: flex;
	align-items: center;
	padding: 10px;
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	font-size: 15px;
	transition: all 0.2s;
	-webkit-tap-highlight-color: transparent;
}

.checkbox-label input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin-right: 12px;
	flex-shrink: 0;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
	border-color: #007bff;
	background: #f0f7ff;
	font-weight: bold;
}

/* 🚨 追加：深掘り質問用のネストボックススタイル */
.sub-question-box {
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	padding: 15px;
	border-radius: 8px;
	margin-top: -5px;
	margin-bottom: 10px;
}
.sub-question-box label:not(.checkbox-label) {
	font-size: 13px;
	font-weight: bold;
	color: #475569;
	display: block;
	margin-bottom: 6px;
}

.hidden {
	display: none;
}

.fade-in {
	animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 767px) {
	main {
		padding: 15px;
	}
	#footer_content,
	.container {
		width: 100%;
		margin: auto;
	}
}

@media (min-width: 768px) {
	#footer_content,
	.container {
		max-width: 680px;
		margin: auto;
	}
}

/* @media (min-width: 1024px) {
	#footer_content,
	.container {
		max-width: 920px;
		margin: auto;
	}
} */
