body {
	font-family: sans-serif;
	margin: 0;
	background-color: #f7f7f7; /* 薄いグレーの背景 */
	color: #333;
	line-height: 1.6;
}

#screenCover {
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	position: fixed;
	background-color: rgba(240, 240, 240, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

#screenCover > div {
	min-width: 300px;
	height: 50px;
	line-height: 50px;
	text-align: center;
	background-color: #FFFFFF;
	border: 2px solid #AAAAAA;
	font-size: 20px;
	padding: 0 1em;
	border-radius: 10px;
}

input[required], select[required] {
	background-color: #FFE0E0 !important; /* 薄い赤色の背景 */
}

input.error-highlight, select.error-highlight {
	border-color: #e74c3c !important; /* 赤色の枠線 */
	border-width: 2px !important;
}

label:has(> #agree.error-highlight) {
	background-color: #FFE0E0 !important;
}

.hiddnObj {
	display: none;
}

.container {
	width: 80%;
	max-width: 1100px;
	margin: 0 auto;
}

/* Header */
.header {
	background-color: #fff;
	padding: 10px 0;
}

.header-container {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.header-text {
	font-size: 0.8em;
	color: #666;
	margin-bottom: 5px;
}

/* Global Navigation */
.global-nav {
	height: 80px;
	color: #fff;
	background-color: #6a962a; /* 緑色 */
	padding: 10px 0;
}

.global-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

.global-nav li {
	margin: 0 15px;
	position: relative;
	color: #fff;
	font-weight: bold;
	font-size: 1.3em;
}

.global-nav li.active {
	box-shadow: inset 0 -3px 0 0 rgb(128, 255, 0);
}

.global-nav li:not(.active):hover {
	background-color: #5a7a1f; /* ホバー時の濃い緑 */
}

.global-nav a {
	height: 100%;
	color: #fff;
	text-decoration: none;
	padding: 5px 0;
	display: block;
	white-space: nowrap; /* 項目が改行されないように */
}

.global-nav .format-type {
	font-weight: normal;
	font-size: 0.7em;
}


/* Main Content */
.main-content {
	padding: 20px 0;
}

.section {
	background-color: #fff;
	padding: 30px;
	margin-bottom: 20px;
	border-radius: 5px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
	font-size: 1.5em;
	color: #333;
	border-bottom: 2px solid #6a962a; /* 緑色の下線 */
	padding-bottom: 10px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
}

.red-star {
	color: #e74c3c; /* 赤い星 */
	margin-right: 10px;
}

.info-box {
	background-color: #f8f9fa;
	border: 1px solid #ced4da;
	padding: 15px;
	border-radius: 5px;
	margin-bottom: 20px;
}

.box-link {
	text-decoration: none;
}

.box-link > div {
	color: #0ab02a;
	background-color: #f8f9fa;
	border: 1px solid #ced4da;
	padding: 15px;
	border-radius: 5px;
	margin-bottom: 20px;
	font-weight: bold;
	font-size: 1.3em;
}

.box-link > div:hover {
	background-color: #e9ecef;
    border-color: #adb5bd;
}

.box-link .sub {
	font-size: 0.7em;
    color: #6c757d;
    margin: 0 10px;
    display: block;
}

/* Contract Buttons */
.contract-buttons {
	display: flex;
	justify-content: space-around;
	gap: 20px;
	margin-top: 30px;
}

.contract-button {
	background-color: #fff;
	border: 1px solid #e74c3c; /* 赤色の枠線 */
	border-radius: 5px;
	padding: 20px;
	text-align: center;
	flex: 1;
	max-width: 300px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.contract-button p {
	font-weight: bold;
	margin-bottom: 15px;
	color: #e74c3c; /* 赤文字 */
}

.download-link {
	display: inline-block;
	background-color: #f7f7f7;
	color: #555;
	border: 1px solid #ccc;
	padding: 10px 20px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: bold;
}

.download-link i {
	margin-right: 8px;
}

.download-link:hover {
	background-color: #e0e0e0;
}

/* Address Section */
.address-section p {
	text-align: center;
	margin-bottom: 15px;
	font-weight: bold;
}

.address-box {
	background-color: #ffe0e0; /* 薄い赤色の背景 */
	border: 1px solid #e74c3c; /* 赤色の枠線 */
	padding: 20px;
	border-radius: 5px;
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}

.address-title {
	font-size: 1.1em;
	font-weight: bold;
	color: #e74c3c;
	margin-bottom: 5px;
}

.address-org,
.address-details {
	margin: 0;
	font-size: 0.95em;
	color: #333;
}

.tablet-browser,
.mobile-browser {
	display: none;
}
.browser {
	display: inline;
}

@media (max-width: 1200px) {
	.browser,
	.mobile-browser {
		display: none;
	}

	.tablet-browser {
		display: inline;
	}

	body {
		padding-top: 170px;
	}
	header {
		position: fixed;
		width: 100%;
		top: 0;
		left: 0;
		z-index: 10;
	}
	.global-nav {
		background-color: #f7f7f7;
		padding: 0 0;
		position: fixed;
		height: 80px;
		width: 100%;
		top: 102px;
		left: 0;
		z-index: 10;
	}

	.container {
		width: 95%;
	}

	.section {
		padding: 10px;
	}

	.global-nav ul {
		height: 100%;
	}
	.global-nav li {
		background-color: #6a962a; /* 緑色 */
		height: 100%;
		min-width: 90px;
		padding: 0 5px;
		font-size: 1.0em;
		font-weight: normal;
	}
}

@media (max-width: 480px) {
	img.header-logo {
		height: 70px;
	}
	
	.global-nav {
		top: 90px;
	}
	
	body {
		padding-top: 155px;
	}

	.browser,
	.tablet-browser {
		display: none;
	}

	.mobile-browser {
		display: inline;
	}

	.global-nav {
		padding: 0 0;
		font-size: 1.0em;
	}

	.global-nav li {
		margin: 0 3px;
		min-width: 80px;
	}

	.global-nav a {
		font-size: 1.0em;
	}

	.section-title {
		font-size: 1.0em;
	}

	.flow-box {
		min-width: 190px;
		padding: 10px 15px;
	}

	.contract-buttons {
		gap: 5px;
	}

	.contract-button p {
		font-size: 0.8em;
	}	

	.contract-button {
		padding: 5px;
	}
}



/* --- Form Styles --- */
.application-form {
	padding: 20px;
	background-color: #fff;
	border-radius: 5px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group-info h3 {
	margin-top: 0;
	font-size: 1.2em;
	color: #333;
}

.form-group-info .checkbox-group {
	display: flex;
	gap: 20px;
	margin-bottom: 15px;
	flex-wrap: wrap; /* スマホ表示時に折り返す */
}

.form-group-info label {
	font-weight: bold;
}

.form-note {
	font-size: 0.9em;
	color: #666;
	margin-bottom: 20px;
	line-height: 1.5;
}

.form-note .red-text {
	color: #e74c3c;
	font-weight: bold;
}

.form-section {
	margin-bottom: 20px;
	padding-bottom: 0px;
	border-bottom: 1px dotted #ccc; /* 各セクションの下線 */
}
.form-section:last-of-type {
	border-bottom: none; /* 最後のセクションは下線なし */
	margin-bottom: 0;
}


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

.form-group label {
	display: block; /* ラベルを常に行頭に表示 */
	font-weight: bold;
	margin-bottom: 8px;
	color: #333;
	font-size: 1.0em;
}

.form-group .inline-label {
	display: inline-block;
	padding-left: 10px;
}

label.required::after {
	content: " (必須)";
	color: #e74c3c; /* 赤色 */
	font-size: 0.9em;
	margin-left: 5px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select {
	width: 100%;
	max-width: 250px; /* 入力フィールドの最大幅 */
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	font-size: 0.95em;
	margin-bottom: 10px; /* 下の要素との余白 */
	vertical-align: middle; /* 整列用 */
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
	margin-right: 5px;
	vertical-align: middle;
}

.form-group #medicalOrgCode {
	width: 120px;
}

.form-group #zipCode {
	width: 100px;
}

.form-group #address, .form-group #homepageUrl {
	max-width: unset;
}

.form-group #phoneNumber, .form-group #faxNumber {
	width: 140px;
}

.form-group input[type="number"][max="999"] {
	width: 80px;
}

.inline-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 15px; /* 行間と列間のギャップ */
	align-items: center;
}

.inline-fields input[type="text"],
.inline-fields input[type="tel"],
.inline-fields input[type="email"],
.inline-fields input[type="url"],
.inline-fields input[type="number"],
.inline-fields select {
	max-width: none; /* inline-fieldsではmax-widthを解除 */
	flex-grow: 1; /* 可能な限り幅をとる */
	margin-bottom: 0; /* inline-fields内のinputは行間のmarginを調整 */
}

.inline-fields label {
	margin-bottom: 0;
	white-space: nowrap; /* ラベルが折り返されないように */
}

.border-dashed-purple {
	border: 1px dashed #a020f0; /* 紫の点線 */
	padding: 15px;
	margin-top: 10px;
	margin-bottom: 0px;
	border-radius: 5px;
}

.border-dashed-purple input {
	margin-bottom: 0px;
}

.add-login-user-btn, .add-change-login-user-btn, .remove-login-user-btn {
	background-color: #28a745; /* 緑色 */
	color: #fff;
	border: none;
	padding: 10px 20px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 1.0em;
	margin-bottom: 20px;
	transition: background-color 0.2s ease;
}

.add-login-user-btn:hover, .add-change-login-user-btn:hover, .remove-login-user-btn:hover {
	background-color: #218838;
}

.add-login-user-btn i, .add-change-login-user-btn i {
	margin-right: 8px;
}

.add-login-user-btn, .add-change-login-user-btn {
	margin-top: 20px;
}

.remove-login-user-btn {
	padding: 6px 20px;
	margin-bottom: 0px;
}

/* 住所検索ボタン */
.search-address-btn {
	background-color: #6a962a; /* 緑色 */
	color: #fff;
	border: none;
	margin-bottom: 10px;
	padding: 8px 15px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95em;
	margin-left: 10px;
	vertical-align: middle;
	transition: background-color 0.2s ease;
}

.search-address-btn:hover {
	background-color: #5a7a1f;
}

.form-description {
	font-size: 0.9em;
	color: #666;
	margin-top: -5px; /* ラベルとの間隔調整 */
	margin-bottom: 10px;
}

.date-time-group input.dateTimeInputField {
	width: 160px;
}

.placeholder-text-after {
	font-size: 0.95em;
	color: #333;
	margin-right: 15px;
	margin-left: 5px; /* inputとの間隔 */
}

/* 登録ボタン */
.form-actions {
	text-align: center;
	margin-top: 30px;
}

.submit-btn {
	background-color: #6a962a; /* 緑色 */
	color: #fff;
	border: none;
	padding: 12px 30px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 1.1em;
	font-weight: bold;
	transition: background-color 0.2s ease;
}

.submit-btn:hover {
	background-color: #5a7a1f;
}

.highlight {
	background-color: #FFD0D0;
	transition: background-color 1s ease-in-out;
}
#address {
	transition: background-color 1s ease-in-out;
}

#zip_code {
	width: 100px;
}

.user-input-wrapper label {
	display: inline-block;
}

.user-input-wrapper input[type="text"], .user-change-wrapper input[type="text"] {
	margin-bottom: 0px;
}

.user-input-wrapper select, .user-change-wrapper select {
	margin-bottom: 0px;
	margin-right: 10px;
}

@media (max-width: 1200px) {
	.form-group input[type="text"] {
		max-width: 200px;
		margin-left: 0;
		margin-right: 5px;
		background-color: #ffffff;
		color: #000000;
	}
	.form-group select {
		max-width: 180px;
		background-color: #ffffff;
		color: #000000;
		font-size: 1.0em;
	}
	.checkbox-group {
		flex-direction: column; /* 縦並び */
	}
}

@media (max-width: 480px) {
	.application-form {
		padding: 10px;
	}
	.form-group input[type="text"],
	.form-group input[type="tel"],
	.form-group input[type="email"],
	.form-group input[type="url"],
	.form-group input[type="number"],
	.form-group select {
		font-size: 0.9em;
		padding: 6px 8px;
	}
	.form-group label {
		font-size: 0.95em;
	}
	.form-group label.required::after {
		font-size: 0.8em;
	}
	.add-login-user-btn, .search-address-btn, .submit-btn {
		padding: 8px 15px;
		font-size: 0.9em;
	}
	.form-description, .form-note {
		font-size: 0.8em;
	}
	.form-group input[type="text"], .form-group select {
		max-width: 1000px;
		margin-left: 0;
		margin-right: 3px;
	}
	.form-group input[type="datetime-local"] {
		background-color: #ffffff;
		color: #000000;
		border: 1px solid #ccc;
		font-size: 1.0em;
	}
	.placeholder-text-after {
		margin-right: 5px;
	}
	.border-dashed-purple input[type="text"], .border-dashed-purple select {
		margin-bottom: 10px;;
	}
}

/* 以下エラーメッセージ表示領域 */
#form-errors {
	position: fixed;
	top: 20px;
	right: 20px;
	width: 400px;
	max-height: 80vh;
	overflow-y: auto;
	background-color: #fff9d6;
	border: 1px solid #ffec7b;
	padding: 15px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	z-index: 1000;
	cursor: grab;
	border-radius: 5px;
}

#form-errors h3 {
	margin-top: 0;
	font-size: 1.1em;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#form-errors .close-button {
	font-size: 1.2em;
	cursor: pointer;
	padding: 5px;
	border-radius: 3px;
	transition: background-color 0.2s;
}

#form-errors .close-button:hover {
	background-color: rgba(0, 0, 0, 0.1);
}

#form-errors ul {
	margin: 0;
	padding-left: 20px;
	list-style-type: disc;
}

#form-errors li {
	margin-bottom: 5px;
	line-height: 1.4;
	cursor: pointer;
}

@media (max-width: 1200px) {
	#form-errors {
		position: unset;
		width: 90%;
		max-height: unset;
		top: unset;
		right: unset;
		margin-bottom: 20px;
		z-index: auto;
		overflow: visible;
	}
}

*:disabled{
	background-color: #FFFFFF;
	opacity: 1;
}

main.complete-mode {
	display: none;
}

@media print {
	header, nav, input[type=button] {
		display: none;
	}
	main.complete-message {
		display: none;
	}
	main.complete-mode {
		display: block !important;
	}
	body {
		padding-top: 0;
	}
	.section {
		padding: 0;
		border: none;
		box-shadow: none;
	}
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}
.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #6C757D;
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-tertiary {
    background-color: #F8F9FA;
    color: #343A40;
    border: 1px solid #CED4DA;
}
.btn-tertiary:hover {
    background-color: #E2E6EA;
    border-color: #DAE0E5;
}

.form-actions-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-bottom: 20px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

