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 {
	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;
}
