/* Header styles - Only apply on simulation template */
body.sim-template header.mo.sim-header,
body.sim-template .sim-header {
	/* Keep original header styles from style.css, only override specific properties */
	background-color: #fff !important;
	background-image: none !important;
	border-bottom: 1px solid #e0e0e0;
	padding: 16px 20px;
	height: auto !important;
	min-height: 90px;
	display: flex;
}

body.sim-template .sim-header img.logo {
	margin: 0 !important;
	max-width: none !important;
	width: 200px !important;
	height: auto !important;
}

body.sim-template .sim-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: #1f2d3d;
}

body.sim-template .sim-logo img {
	width: 120px;
	height: auto;
	object-fit: contain;
}

body.sim-template .sim-header #menu-box {
	margin-left: auto;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 20px;
}

/* Ensure menu styles from style.css are applied on simulation template */
@media only screen and (max-width: 1280px) {
	body.sim-template .sim-header #menu-box {
		position: fixed;
		top: 0;
		left: 0;
		float: none;
		clear: both;
		z-index: 9999;
		margin: 0;
		padding: 0;
		width: 100%;
		height: auto;
		display: block;
	}

	body.sim-template .sim-header menu.dnone {
		position: fixed;
		top: 0;
		float: left;
		clear: both;
		margin: 0;
		background: rgba(58, 139, 33, 0.9);
		padding: 0;
		width: 100%;
		height: auto;
		height: 100vh;
		text-align: center;
	}

	body.sim-template .sim-header menu.dnone ul {
		display: inherit;
		float: left;
		clear: both;
		margin: 0;
		border-top: 1px solid #fff;
		border-bottom: none;
		padding: 0;
		width: 100%;
		height: auto;
		text-align: center;
	}

	body.sim-template .sim-header menu.dnone li {
		display: block;
		flex: inherit;
		float: left;
		margin: 0;
		border-bottom: 1px solid #fff;
		background: none;
		padding: 0;
		width: 100%;
		color: #777;
		font-weight: 400;
		font-size: 17px;
		line-height: 100%;
		list-style-type: none;
		text-align: center;
	}

	body.sim-template .sim-header menu.dnone li a:link,
	body.sim-template .sim-header menu.dnone li a:visited {
		display: block;
		float: none;
		padding: 25px 0 25px;
		color: #fff;
		font-size: 17px;
		line-height: 100%;
		text-align: center;
		text-decoration: none;
	}

	body.sim-template .sim-header menu.dnone li a:hover {
		text-decoration: underline;
	}
}

/* Footer styles - Only apply on simulation template */
body.sim-template .sim-footer {
	background-color: #fff;
	border-top: 1px solid #e0e0e0;
	padding: 40px 20px 24px;
	margin-top: 0px;
}

body.sim-template .sim-footer-menu {
	text-align: center;
	width: 100%;
}

body.sim-template .sim-footer-menu ul {
	display: inline-flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 16px 24px;
	justify-content: center;
}

body.sim-template .sim-footer-menu ul li {
	margin: 0;
}

body.sim-template .sim-footer-menu ul li a {
	color: #4a5568;
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.2s ease;
}

body.sim-template .sim-footer-menu ul li a:hover {
	color: #1a6ed8;
}

body.sim-template .sim-footer-copyright {
	text-align: center;
	margin-top: 24px;
	padding-top: 24px;
}

body.sim-template .sim-footer-copyright p {
	margin: 0;
	color: #6b7280;
	font-size: 0.85rem;
}

.sim-page {
	background-color: #e7f1fb;
	min-height: 100vh;
}

.sim-page .site-main,
main.sim-page {
	background-image: none !important;
	background-attachment: initial !important;
	margin-top: 0 !important;
	padding-bottom: 80px;
}

.sim-progress {
	background-color: #1a6ed8;
	color: #fff;
	padding: 24px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	position: fixed;
	top: 106px;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 9998;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sim-progress.is-hidden {
	display: none;
}

.sim-progress-status {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	flex-shrink: 0;
}

.sim-progress-status .sim-progress-remaining-text span {
	display: inline-block;
	font-size: 1.2rem;
	margin: 0 4px;
}

.sim-progress-status .sim-progress-remaining-text [data-sim-remaining] {
	font-size: 2.4rem;
	font-weight: 800;
	line-height: 1;
	margin: 0 8px;
}

.sim-progress-bar {
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 0;
	height: 20px;
	flex: 1;
	max-width: 720px;
	overflow: hidden;
}

.sim-progress-bar-current {
	background-color: #ff9100;
	border-radius: 0;
	display: block;
	height: 100%;
	transform-origin: left center;
	transition: width 0.3s ease;
	width: 0;
}

.sim-layout {
	margin: 0 auto;
	max-width: 960px;
	padding: 40px 20px 120px;
	transition: padding-top 0.3s ease;
}

body.sim-progress-visible .sim-page .sim-layout {
	padding-top: 210px;
}

body.sim-property-selection .sim-page .sim-layout {
	padding-top: 140px;
}


.sim-app {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.sim-step {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.sim-row {
	align-items: flex-start;
	display: flex;
	gap: 16px;
}

.sim-row-agent {
	justify-content: flex-start;
}

.sim-row-user {
	justify-content: flex-end;
}

.sim-face {
	flex: 0 0 104px;
	max-width: 104px;
}

.sim-face img {
	display: block;
	height: auto;
	max-width: 100%;
}

.sim-bubble {
	background-color: #fff;
	border: 2px solid #75adeb;
	border-radius: 24px;
	box-shadow: 0 10px 24px rgba(31, 73, 125, 0.15);
	color: #1f2d3d;
	flex: 1 1 auto;
	font-size: 1.05rem;
	line-height: 1.6;
	padding: 24px 28px;
	position: relative;
	text-align: left;
}

.sim-row-user .sim-bubble {
	border-color: #ff9100;
}

.sim-row-agent .sim-bubble::before,
.sim-row-agent .sim-bubble::after,
.sim-row-user .sim-bubble::before,
.sim-row-user .sim-bubble::after {
	content: '';
	position: absolute;
	top: 31px;
	width: 0;
	height: 0;
}

.sim-row-agent .sim-bubble::before {
	left: -16px;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-right: 16px solid #75adeb;
	top: 29px;
}

.sim-row-agent .sim-bubble::after {
	left: -12px;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-right: 12px solid #fff;
}

.sim-row-user .sim-bubble::before {
	right: -16px;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 16px solid #ff9100;
}

.sim-row-user .sim-bubble::after {
	right: -12px;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 12px solid #fff;
	top: 33px;
}

.sim-bubble p {
	margin: 0 0 12px;
}

.sim-bubble p:last-child {
	margin-bottom: 0;
}

.sim-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.sim-form-field {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sim-form-field label {
	color: #1f2d3d;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.sim-input {
	background-color: #fff;
	border: 2px solid #b5c8e6;
	border-radius: 14px;
	font-size: 1rem;
	padding: 14px 16px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
}

body.sim-template input[type='tel'].sim-input {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: textfield;
	background-color: #fff;
	border: 2px solid #b5c8e6 !important;
	border-radius: 14px;
	box-sizing: border-box;
	color: #1f2d3d;
	font: inherit;
	padding: 14px 16px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select.sim-input {
	padding-top: 12px;
	padding-bottom: 12px;
	line-height: 1.4;
	min-height: 48px;
	appearance: none;
	-webkit-appearance: none;
}

.sim-input:focus {
	border-color: #1a6ed8;
	box-shadow: 0 0 0 3px rgba(26, 110, 216, 0.15);
	outline: none;
}

body.sim-template input[type='tel'].sim-input:focus {
	border-color: #1a6ed8 !important;
	box-shadow: 0 0 0 3px rgba(26, 110, 216, 0.15) !important;
}


.sim-input.size-small {
	max-width: 240px;
}

.sim-input.size-medium {
	max-width: 400px;
}

.sim-input.size-large {
	min-height: 148px;
	resize: vertical;
}

.sim-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
	border: 2px solid transparent;
	border-radius: 14px;
	padding: 8px 12px;
}

.sim-option {
	align-items: center;
	display: grid;
	gap: 12px;
	grid-template-columns: 24px auto;
}

.sim-option input[type='checkbox'],
.sim-option input[type='radio'] {
	appearance: none;
	-webkit-appearance: none;
	background-color: #fff;
	border: 2px solid #ff9100;
	height: 22px;
	width: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	position: relative;
}

.sim-option input[type='checkbox'] {
	background-color: #fff;
	border-color: #ff9100;
}

.sim-option input[type='checkbox']::after,
.sim-option input[type='radio']::after {
	content: '';
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.sim-option input[type='checkbox']::after {
	width: 8px;
	height: 14px;
	border-right: 3px solid #fff;
	border-bottom: 3px solid #fff;
	transform: translate(-50%, -60%) rotate(45deg) scale(0.7);
}

.sim-option input[type='radio'] {
	border-radius: 50%;
}

.sim-option input[type='radio']::after {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #ff9100;
	transform: translate(-50%, -50%) scale(0.4);
}

.sim-option input[type='checkbox']:checked {
	background-color: #ff9100;
	border-color: #ff9100;
}

.sim-option input[type='checkbox']:checked::after {
	opacity: 1;
	transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

.sim-option input[type='radio']:checked::after {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.sim-actions {
	align-items: center;
	display: flex;
	justify-content: center;
	margin-top: 16px;
}

.sim-button {
	background-color: #ff7d00;
	border: none;
	border-radius: 0;
	box-shadow: 0 10px 24px rgba(255, 125, 0, 0.35);
	color: #fff;
	cursor: pointer;
	font-size: 1.1rem;
	font-weight: 700;
	min-width: 220px;
	padding: 16px 48px;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.sim-button:hover:not(:disabled) {
	opacity: 0.85;
	transform: translateY(-1px);
}

.sim-button:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.sim-form-field.is-invalid .sim-input,
.sim-form-field.is-invalid .sim-options {
	border-color: #e55353;
	box-shadow: 0 0 0 3px rgba(229, 83, 83, 0.18);
}

.sim-form-field.is-invalid label {
	color: #c13232;
}

.sim-summary {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.sim-summary .sim-bubble {
	max-width: 640px;
	text-align: left;
}

.sim-page-content {
	margin-top: 48px;
	background: #fff;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 18px 40px rgba(30, 82, 133, 0.15);
}

.sim-page-content > *:first-child {
	margin-top: 0;
}

.sim-page-content > *:last-child {
	margin-bottom: 0;
}

.sim-empty {
	color: #4a5568;
	padding: 24px;
	text-align: center;
}

@media (max-width: 768px) {
	body.sim-template .sim-header {
		background-image: none !important;
		background-color: #fff !important;
		padding: 12px 16px;
		min-height: 72px;
	}

	body.sim-template .sim-header img.logo {
		width: 140px !important;
	}

	.sim-page .site-main,
	main.sim-page {
		background-image: none !important;
		background-attachment: initial !important;
	}

	.sim-progress {
		padding: 16px 12px;
		top: 90px;
		flex-direction: row;
		gap: 16px;
	}

	.sim-page .sim-layout {
		padding: 24px 16px 80px;
	}

	body.sim-progress-visible .sim-page .sim-layout {
		padding-top: 180px;
	}

	body.sim-property-selection .sim-page .sim-layout {
		padding-top: 120px;
	}

	.sim-progress-status {
		font-size: 1.1rem;
		flex-shrink: 0;
	}

	.sim-progress-bar {
		height: 18px;
	}

	.sim-face {
		display: block;
		width: 72px;
	}

	.sim-layout {
		padding: 24px 16px 80px;
	}

	.sim-bubble {
		padding: 20px;
	}

	.sim-input.size-small,
	.sim-input.size-medium {
		max-width: 100%;
	}

	.sim-button {
		min-width: 180px;
		padding: 14px 32px;
		width: 100%;
	}

	.sim-face {
		flex: 0 0 72px;
		max-width: 72px;
	}

	.sim-page-content {
		margin-top: 32px;
		padding: 24px 20px;
	}

	body.sim-template .sim-footer {
		margin-top: 0;
		padding-top: 0;
	}
}

/* コンテンツページ用スタイル */
body.sim-template .sim-content-page {
	padding: 40px 5%;
	max-width: 1200px;
	margin: 0 auto;
}

body.sim-template .sim-content-wrapper {
	text-align: left;
}

body.sim-template .sim-content-wrapper h1,
body.sim-template .sim-content-wrapper h2,
body.sim-template .sim-content-wrapper h3,
body.sim-template .sim-content-wrapper h4,
body.sim-template .sim-content-wrapper h5,
body.sim-template .sim-content-wrapper h6 {
	margin-top: 2em;
	margin-bottom: 1em;
	font-weight: 700;
}

body.sim-template .sim-content-wrapper p {
	margin-bottom: 1.5em;
	line-height: 1.8;
}

body.sim-template .sim-page .sim-content-wrapper ul,
body.sim-template .sim-page .sim-content-wrapper ol {
	margin-bottom: 1.5em;
	padding-left: 2em;
}

body.sim-template .sim-content-wrapper li {
	margin-bottom: 0.5em;
}

body.sim-template .sim-content-wrapper img {
	max-width: 100%;
	height: auto;
	margin: 1.5em 0;
}

body.sim-template .sim-content-wrapper blockquote {
	margin: 1.5em 0;
	padding: 1em 1.5em;
	border-left: 4px solid #75adeb;
	background-color: #f5f9ff;
}

body.sim-template .sim-content-wrapper table {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: collapse;
}

body.sim-template .sim-content-wrapper table th,
body.sim-template .sim-content-wrapper table td {
	padding: 12px;
	border: 1px solid #b5c8e6;
	text-align: left;
}

body.sim-template .sim-content-wrapper table th {
	background-color: #f5f9ff;
	font-weight: 700;
}

@media only screen and (max-width: 768px) {
	body.sim-template .sim-content-page {
		padding: 24px 20px;
	}
}

