html {
	height: 100%;
}

body {
	height: 100%;
	padding: 0;
	margin: 0;
	background-color: var(--main-bg-color);
}

header {
	width: 100%;
	padding: 10px 0;
	background-color: #fff;
	border-bottom: 1px solid #ccc;
}

#header_content a {
	font-size: 1.2rem;
	font-weight: bold;
	color: #000;
	text-decoration: none;
}

#header_content a:hover {
	color: #000;
}

#clinictitle {
	margin: 1rem 0;
	font-size: 1.2rem;
	font-weight: bold;
	text-align: center;
}

#main {
	padding: 1rem 0.5rem;
	font-size: 0.9rem;
	background-color: #fff;
	border: 1px solid #dfe4ea;
	border-radius: 20px;
}

#main > p {
	margin: 0.5rem;
}

#pagetitle {
	font-size: 1.1rem;
	font-weight: bold;
	text-align: center;
}

#consentform {
	font-size: 0.9rem;
	text-align: justify;
}

.list {
	margin-bottom: 0;
}

#bottom-section {
	margin: 1rem;
	text-align: center;
}

footer {
	position: sticky;
	top: 100vh;
	width: 100%;
	padding: 4px 0;
}

#footer_content {
	font-size: 0.8rem;
	text-align: center;
}

@media (max-width: 767px) {
	#header_content,
	#main,
	#footer_content {
		width: 96%;
		margin: auto;
	}
}

@media (min-width: 768px) {
	#header_content,
	#main,
	#footer_content {
		width: 680px;
		margin: auto;
	}
}

@media (min-width: 1024px) {
	#header_content,
	#main,
	#footer_content {
		width: 920px;
		margin: auto;
	}
}

.control {
	position: relative;
	display: block;
	padding-left: 22px;
	margin-bottom: 10px;
	cursor: pointer;
}

.control input {
	position: absolute;
	z-index: -1;
	opacity: 0;
}

.control__indicator {
	position: absolute;
	top: 3px;
	left: 0;
	width: 18px;
	height: 18px;
	background: #e6e6e6;
}

.control--radio .control__indicator {
	border-radius: 50%;
}

.control:hover input ~ .control__indicator,
.control input:focus ~ .control__indicator {
	background: #ccc;
}

.control input:checked ~ .control__indicator {
	background: var(--btn-blue);
}

.control:hover input:not([disabled]):checked ~ .control__indicator,
.control input:checked:focus ~ .control__indicator {
	background: var(--btn-blue);
}

.control input:disabled ~ .control__indicator {
	pointer-events: none;
	background: #e6e6e6;
	opacity: 0.6;
}

.control__indicator::after {
	position: absolute;
	display: none;
	content: '';
}

.control input:checked ~ .control__indicator::after {
	display: block;
}

.control--checkbox .control__indicator::after {
	top: 3px;
	left: 7px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.control--checkbox input:disabled ~ .control__indicator::after {
	border-color: #7b7b7b;
}

.control--radio .control__indicator::after {
	top: 6px;
	left: 6px;
	width: 6px;
	height: 6px;
	background: #fff;
	border-radius: 50%;
}

.control--radio input:disabled ~ .control__indicator::after {
	background: #7b7b7b;
}

.block-btn {
	position: relative;
	display: block;
	width: 100%;
	max-width: 300px;
	padding: 0.5em 0.3em;
	margin: 0.5rem auto;
	font-size: 1em;
	font-weight: bold;
	color: #fff;
	text-align: center;
	text-decoration: none !important;
	border-radius: 5px;
	-webkit-transition: none;
	transition: none;
	/* box-shadow: 0 3px 0 #2ecc71; */
}

.blue-btn {
	background-color: #2980b9;
}

.blue-btn:hover {
	color: #fff;
	background-color: #3498db;
}

.submit-btn {
	background-color: #27ae60;
}

.submit-btn:hover {
	color: #fff;
	background-color: #2ecc71;
}

.submit-btn:disabled {
	color: #fff;
	background-color: #e74c3c;
}

.back-btn {
	background-color: #95a5a6;
}

.back-btn:hover {
	color: #fff;
	background-color: #b2bec3;
}

#patient {
	margin: auto;
}

.pname {
	font-weight: bold;
}

.rdate {
	text-align: end;
}

#monshin {
	width: 100%;
}

#monshin .quest {
	padding: 0.5rem;
	font-weight: bold;
	background-color: var(--quest-bg-color);
}

#monshin .answer {
	padding: 1rem;
	vertical-align: middle;
}

.answer table {
	width: 100%;
}

.answer td {
	vertical-align: middle;
}

.other {
	display: flex;
	margin-bottom: 10px;
}

.inline-form {
	display: inline-block;
	width: 150px;
}

.answer input[type='date'] {
	width: 150px;
}

.after-text {
	margin-left: 0.25rem;
	font-size: 0.9rem;
	color: #212529;
}

.subquest {
	padding: 0.3rem 0.7rem;
	font-size: 0.9rem;
}

.subq {
	margin-bottom: 0.5rem;
}

.subqtitle {
	margin-bottom: 0.2rem;
}

.subquest textarea {
	margin-bottom: 0.5rem;
}

.other .control {
	margin: auto 0;
	margin-right: 0.5rem;
}

.other .subquest {
	flex-grow: 1;
	padding: 0;
}

.other .subquest .form-control {
	padding: 0.25rem 0.5rem;
}

.tph[readonly],
.tpm[readonly] {
	background-color: #fff;
}

.renban {
	/* padding : 0.5em; */
	list-style-type: none;
	counter-reset: num;
}

.renban .qno {
	position: relative;
	padding-left: 1.5em;
}

.renban .qno::before {
	position: absolute;
	top: 3px;
	left: 0;
	width: 16px;
	height: 16px;
	font-size: 12px;
	line-height: 1.1;
	text-align: center;
	content: counter(num);
	counter-increment: num;
	border: 1px solid #555;
	border-radius: 50%;
	/* display : inline-block; */
	/* color : #555555; */
	/* background : transparent; */
	/* font-weight : bold; */
}

.subqno {
	position: relative;
	padding-left: 1.3em;
}

.subqno::before {
	position: absolute;
	top: 5px;
	left: 3px;
	width: 0;
	height: 0;
	line-height: 1;
	color: #d35400;
	content: '';
	border-color: transparent;
	border-style: solid;
	border-width: 0.375em 0.64952em;
	border-right: 0;
	border-left-color: currentcolor;
}

.fileupload {
	width: 200px;
	padding: 0.3em;
	font-weight: 500;
	color: #fff;
	text-align: center;
	cursor: pointer;
	background-color: #2589d0;
	border: 2px solid #fff;
	border-radius: 5px;
	box-shadow: 0 0 0 3px #2589d0;
}

.fileupload > input {
	display: none; /* アップロードボタンのスタイルを無効にする */
}

.require::after {
	display: inline-block;
	margin-left: 10px;
	font-size: 0.8rem;
	line-height: 14px;
	vertical-align: middle;
	color: #e74c3c;
	content: '\5fc5\9808'; /* 必須 */
}

.require.en::after {
	content: 'Required'; /* 必須 */
}

.list-radio {
	border: none;
}

.list-radio label {
	position: relative;
	display: flex;
	gap: 0 0.5em;
	align-items: center;
	max-width: 200px;
	padding: 0.5em 0.7em;
	margin-bottom: 0.4em;
	cursor: pointer;
	background-color: #fff;
	border: 1px solid #227093;
	border-radius: 3px;
}

.list-radio label:has(:checked) {
	color: #fff;
	background-color: #227093;
}

.list-radio label:has(:disabled) {
	background-color: #e9ecef;
}

.list-radio label::before,
.list-radio label:has(:checked)::after {
	content: '';
	border-radius: 50%;
}

.list-radio label::before {
	width: 14px;
	height: 14px;
	background-color: #fff;
	border: 1px solid #227093;
}

.list-radio label:has(:checked)::after {
	position: absolute;
	top: 50%;
	left: calc(7px + 0.7em);
	width: 7px;
	height: 7px;
	background-color: #0984e3;
	transform: translate(-50%, -50%);
}

.list-radio input {
	display: none;
}

.list-checkbox {
	border: none;
}

.list-checkbox label {
	position: relative;
	display: flex;
	gap: 0 0.5em;
	align-items: center;
	max-width: 200px;
	padding: 0.5em 0.7em;
	margin-bottom: 0.4em;
	cursor: pointer;
	background-color: #e9ecef;
	border: 1px solid #227093;
	border-radius: 3px;
}

.list-checkbox label:has(:checked) {
	color: #fff;
	background-color: #227093;
}

.list-checkbox label::before {
	width: 14px;
	height: 14px;
	content: '';
	background-color: #fff;
	border-radius: 1px;
}

.list-checkbox label:has(:checked)::after {
	position: absolute;
	top: 14px;
	left: 15px;
	width: 4px;
	height: 8px;
	content: '';
	border: solid #227093;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.list-checkbox input {
	display: none;
}

@document url-prefix() {
	.list-radio input {
		display: block;
	}
}

.canvas-container {
	margin: auto;
}

#canvas {
	border: solid 2px #2c3e50;
}

.horizontal-radio {
	float: left;
	width: 100%;
	margin: 0 0 10px;
}

.horizontal-radio input {
	display: none;
}

.horizontal-radio label {
	float: left;
	display: block;
	width: 50%;
	padding: 0.5rem;
	font-weight: bold;
	color: #555e64;
	text-align: center;
	cursor: pointer;
	background: #e5e5e5;
	border: 0;
	transition: 0.2s;
}

.horizontal-radio label:nth-of-type(n + 3) {
	border-top: 1px solid #d7d7d7;
}

.horizontal-radio label:nth-of-type(2n + 1) {
	border-right: 1px solid #d7d7d7;
}

.horizontal-radio input[type='radio']:checked + label {
	color: #fff;
	background-color: #16a085;
}

.alert-msg {
	display: block;
	width: 100%;
	margin-top: 0.25rem;
	font-size: 0.875em;
	color: #d84315;
}

.break-mobile {
	/* CJKテキストでの折り返しを無効化 */
	word-break: keep-all;

	/* 長い単語でも折り返し可能に */
	overflow-wrap: anywhere;
}

.choice-row {
	margin: 10px 0;
}

.sub-question-box {
	display: none;
	padding: 12px;
	margin-top: 8px;
	margin-left: 24px;
	background-color: rgb(247 249 250);
	border-left: 3px solid rgb(0 123 255);
	border-radius: 4px;
}

.sub-question-box > p {
	margin-top: 0;
	margin-bottom: 8px;
	font-size: 0.95em;
	font-weight: bold;
}

.sub-question-box .subans {
	margin: 8px;
}

/* --- アコーディオンのスタイル --- */
.accordion-section {
	margin-bottom: 12px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #d9e2ec;
	border-radius: 8px;
}

.accordion-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	font-size: 1rem;
	/* ヘッダーを淡い青に */
	font-weight: bold;
	color: #102a43;
	cursor: pointer;
	user-select: none;
	background-color: #f0f4f8;
}

.accordion-icon::after {
	display: inline-block;
	font-size: 0.8rem;
	color: #627d98;
	content: '▼';
	transition: transform 0.3s;
}

.accordion-section.is-open .accordion-icon::after {
	transform: rotate(180deg);
}

.accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-out;
}

.accordion-section.is-open .accordion-content {
	max-height: 1000px;
	padding: 8px 16px;
	border-top: 1px solid #d9e2ec;
}

/* --- ワクチン行＆横並びボタンのスタイル --- */
.vaccine-row {
	padding: 14px 0;
	border-bottom: 1px solid #f0f4f8;
}

.vaccine-row:last-child {
	border-bottom: none;
}

.vaccine-name {
	display: flex;
	align-items: center; /* バッジと文字の縦の中心を揃える */
	margin-bottom: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	color: #334e68;
}

.btn-group {
	display: flex;
	gap: 6px;
}

.btn-label {
	flex: 1;
	cursor: pointer;
}

.btn-label input[type='checkbox'] {
	display: none;
}

.btn-text {
	display: block;
	padding: 10px 4px;
	font-size: 0.85rem;
	color: #486581;
	text-align: center;
	background-color: #f0f4f8;
	/* 未選択時は目立たない淡いグレーブルー */
	border: 2px solid #f0f4f8;
	border-radius: 6px;
	transition: all 0.2s;
}

/* 選択されたときのスタイル（綺麗なブルー） */
.btn-label input:checked + .btn-text {
	/* 選択時の文字色 */
	font-weight: bold;
	/* 選択時の枠線 */
	color: #049;
	background-color: #e1f0ff;
	/* 選択時の背景（クリアな水色） */
	border-color: #06c;
}

/* バッジの共通スタイル */
.badge {
	padding: 3px 6px; /* 上下左右の余白 */
	margin-right: 8px; /* ワクチン名との間隔 */
	font-size: 11px; /* 文字より少し小さくして上品に */
	font-weight: bold;
	white-space: nowrap; /* 改行を防ぐ */
	border-radius: 4px; /* 少し角を丸める */
}

/* 定期バッジ（青系） */
.badge-routine {
	color: #049;
	background-color: #e1f0ff;
}

/* 任意バッジ（オレンジ系） */
.badge-voluntary {
	color: #d9480f;
	background-color: #fff4e6;
}

.unvaccinated-shortcut-box {
	padding: 15px;
	margin-bottom: 20px;
	font-size: 14.4px;
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
}
/* 未接種ボタン */
.unvaccinated-shortcut-box {
	padding: 12px 15px;
	margin-bottom: 20px;
	font-size: 14.4px;
	background-color: #f1f3f5;
	border: 1px solid #ced4da;
	border-radius: 6px;
}

/* ラベル全体をタップ可能にする */
.shortcut-checkbox-label {
	display: flex;
	align-items: center;
	font-size: 15px;
	font-weight: bold;
	color: #212529;
	cursor: pointer;
}

/* チェックボックス自体を少し大きくしてスマホで押しやすく */
.shortcut-checkbox {
	width: 18px;
	height: 18px;
	margin-right: 10px;
	cursor: pointer;
}

.shortcut-subtext {
	padding-left: 28px; /* チェックボックスの横幅分ずらす */
	margin-top: 6px;
	margin-bottom: 0;
	font-size: 12px;
	line-height: 1.4;
	color: #6c757d;
}
