/**
 * Contact page — width and type aligned to About us.
 */

.hds-contact {
	width: 100%;
	max-width: none;
	margin: 0 auto;
	padding: 53px 92px 80px;
	box-sizing: border-box;
	--hds-archive-rail: calc(1096px * 800 / 880);
	--hds-news-list-rail: calc(800px * 800 / 880);
}

@media screen and (min-width: 1400px) {
	.hds-contact {
		--hds-archive-rail: calc(1096px * 800 / 780);
		--hds-news-list-rail: calc(800px * 800 / 780);
	}
}

@media screen and (min-width: 1600px) {
	.hds-contact {
		--hds-archive-rail: calc(1096px * 1000 * 800 / (780 * 880));
		--hds-news-list-rail: calc(800px * 1000 * 800 / (780 * 880));
	}
}

.hds-contact__inner {
	width: 100%;
	max-width: var(--hds-archive-rail);
	margin: 0 auto;
}

.hds-contact__title {
	margin: 0 0 72px;
	padding: 0;
	color: #333333;
	font-family: "Cormorant Garamond", "EB Garamond", serif;
	font-size: calc(45px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
}

.hds-contact__content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	max-width: var(--hds-news-list-rail);
	margin: 0 auto;
}

.hds-contact__heading {
	margin: 0;
	padding: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(24px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 2.2px;
	font-feature-settings: "palt" 1;
	font-variant-east-asian: proportional-width;
}

.hds-contact__lead {
	margin: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(18px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 2.3;
	letter-spacing: 1.44px;
	text-align: justify;
	text-justify: inter-ideograph;
}

.hds-contact__lead p {
	margin: 0;
}

.hds-contact--smf .smf-form {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 28px;
	width: 100%;
	margin: 40px 0 0;
	padding: 0;
}

.hds-contact--smf .smf-form .smf-item {
	display: grid;
	grid-template-columns: max(148px, calc(150px * var(--hds-type-scale, 1))) minmax(0, 1fr);
	column-gap: 20px;
	row-gap: 8px;
	align-items: center;
	width: 100%;
}

.hds-contact--smf .smf-form .smf-item:is(.hds-contact-form__row--full, :has(textarea, .smf-placeholder[data-name="message"])),
:where(.hds-contact--smf) .smf-action {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.hds-contact--smf .smf-form .smf-item:is(.hds-contact-form__row--full, :has(textarea, .smf-placeholder[data-name="message"])) {
	align-items: flex-start;
}

.hds-contact--smf .smf-form .smf-text-control__control,
.hds-contact--smf .smf-form .smf-textarea-control__control {
	display: block;
	width: 100%;
	margin: 0;
	padding: 6px 10px;
	box-sizing: border-box;
	border: 1px solid #9b9b9b;
	border-radius: 2px;
	background-color: rgba(162, 162, 162, 0.2);
	box-shadow: none;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(16px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.5;
	appearance: none;
}

.hds-contact--smf .smf-form .smf-text-control__control {
	height: 34px;
}

.hds-contact--smf .smf-form .smf-text-control__control:is(.hds-contact-form__input--zip, [name="postal_code"]) {
	width: 163px;
	max-width: 100%;
}

.hds-contact--smf .smf-form .smf-textarea-control__control {
	min-height: 280px;
	padding: 12px 10px;
	border-radius: 0;
	text-align: left;
	resize: vertical;
}

.hds-contact--smf .smf-form .smf-text-control__control::placeholder {
	color: rgba(0, 0, 0, 0.4);
	font-size: calc(14px * var(--hds-type-scale, 1));
	letter-spacing: -0.154px;
}

.hds-contact--smf .smf-form .smf-text-control__control:focus,
.hds-contact--smf .smf-form .smf-textarea-control__control:focus {
	outline: 2px solid #333333;
	outline-offset: 2px;
}

.hds-contact-form__policy {
	margin: 12px 0 0;
	padding: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(12px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: -0.132px;
	text-align: center;
}

.hds-contact-form__policy a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hds-contact-form__policy a:hover {
	opacity: 0.7;
}

:where(.hds-contact--smf) .smf-action {
	gap: 12px;
}

.hds-contact--smf .smf-action button[data-action="back"],
.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"]) {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px;
	box-sizing: border-box;
	border: 1px solid #000;
	border-radius: 0;
	background: transparent;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(16px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.hds-contact--smf .smf-action button[data-action="back"] {
	min-height: 48px;
}

.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"]) {
	min-height: 74px;
}

.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"])::after {
	content: "";
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 9px;
	height: 9px;
	background-color: #000;
	clip-path: polygon(100% 0, 0 100%, 100% 100%);
	pointer-events: none;
}

.hds-contact--smf .smf-action button[data-action="back"]:hover,
.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"]):hover,
.hds-contact--smf .smf-action button[data-action="back"]:focus,
.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"]):focus {
	background-color: rgba(255, 255, 255, 0.2);
}

.hds-contact--smf .smf-action button[data-action="back"]:focus-visible,
.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"]):focus-visible {
	outline: 2px solid currentColor !important;
	outline-offset: 2px;
}

.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"]):disabled,
.hds-contact--smf .smf-action button[data-action="back"]:disabled {
	opacity: 0.55;
	cursor: wait;
}

@media screen and (max-width: 1100px) {
	.hds-contact {
		padding: 40px 48px 64px;
	}

	.hds-contact__title {
		margin-bottom: 48px;
	}
}

@media screen and (max-width: 781px) {
	.hds-contact {
		padding: 24px 24px 48px;
	}

	.hds-contact__title {
		margin-bottom: 36px;
		font-size: calc(36px * var(--hds-type-scale, 1));
	}

	.hds-contact__heading {
		font-size: calc(17.5px * var(--hds-type-scale, 1));
		font-weight: 400;
		line-height: 1.4;
		letter-spacing: 1.6px;
	}

	.hds-contact__lead {
		font-size: 15px;
		font-weight: 400;
		line-height: 1.72;
		letter-spacing: 1.12px;
	}

	.hds-contact--smf .smf-form {
		margin-top: 32px;
		gap: 24px;
	}

	.hds-contact--smf .smf-form .smf-item {
		grid-template-columns: 1fr;
		align-items: start;
	}

	.hds-contact--smf .smf-form .smf-text-control__control,
	.hds-contact--smf .smf-form .smf-textarea-control__control {
		font-size: 15px;
	}

	.hds-contact--smf .smf-form .smf-text-control__control:is(.hds-contact-form__input--zip, [name="postal_code"]) {
		width: 100%;
	}

	.hds-contact--smf .smf-form .smf-textarea-control__control {
		min-height: 200px;
	}

	.hds-contact--smf .smf-action button:is([data-action="confirm"], [data-action="complete"]) {
		min-height: 64px;
	}
}

.hds-contact--thanks .hds-contact__content {
	gap: 24px;
}

.hds-contact__thanks-heading,
.hds-contact__confirm-heading {
	margin: 0;
	padding: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(30px * var(--hds-type-scale, 1));
	font-weight: 500;
	line-height: 2.1;
	letter-spacing: -0.33px;
	text-align: left;
}

.hds-contact__thanks-body {
	margin: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(14px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: -0.154px;
	text-align: left;
}

.hds-contact__thanks-body p {
	margin: 0;
}

.hds-contact__thanks-body p + p {
	margin-top: 1.7em;
}

.hds-contact__thanks-home {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 74px;
	margin: 40px 0 0;
	padding: 10px;
	box-sizing: border-box;
	border: 1px solid #000;
	background-color: transparent;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(16px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.hds-contact__thanks-home::after {
	content: "";
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 9px;
	height: 9px;
	background-color: #000;
	clip-path: polygon(100% 0, 0 100%, 100% 100%);
	pointer-events: none;
}

.hds-contact__thanks-home:hover,
.hds-contact__thanks-home:focus {
	color: #333333;
	background-color: rgba(255, 255, 255, 0.2);
	text-decoration: none;
}

.hds-contact__thanks-home:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media screen and (max-width: 781px) {
	.hds-contact__thanks-heading,
	.hds-contact__confirm-heading {
		font-size: calc(20px * var(--hds-type-scale, 1));
		line-height: 1.6;
		letter-spacing: -0.2px;
	}

	.hds-contact__thanks-home {
		min-height: 64px;
		margin-top: 32px;
	}
}

/* Snow Monkey Forms renders the form action area outside the field list. */
.hds-contact--smf .smf-action {
	margin-top: 28px;
}

.hds-contact--smf .smf-action .smf-button-control + .smf-button-control {
	margin-left: 0;
}

.hds-contact--smf .smf-item__col,
.hds-contact--smf .smf-item__controls {
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 0;
}

.hds-contact--smf .smf-item__label {
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(16px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: -0.176px;
}

.hds-contact--smf .smf-item__label,
.hds-contact--smf .smf-item__label label {
	cursor: default;
}

.hds-contact--smf .smf-item__label label {
	display: block;
}

.hds-contact--smf .smf-item:has(> .smf-item__col--controls [data-validations~="required"]) > .smf-item__col--label .smf-item__label__text::after {
	content: "必須";
	display: inline-block;
	margin-inline-start: 8px;
	padding-inline: 3px;
	font-size: calc(12px * var(--hds-type-scale, 1));
	line-height: 1.4;
	outline: 1px solid currentColor;
	outline-offset: 2px;
	vertical-align: middle;
	transform: translateY(-.15em);
	white-space: nowrap;
}

.hds-contact--smf .smf-item__col--label:has(.smf-item__description) {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 10px;
}

.hds-contact--smf .smf-item__description {
	margin: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(12px * var(--hds-type-scale, 1));
	line-height: 1.4;
	letter-spacing: -0.132px;
}

.hds-contact--smf .smf-error-messages {
	color: #c00;
	font-family: "Noto Serif JP", serif;
	font-size: calc(13px * var(--hds-type-scale, 1));
}

.hds-contact__confirm-heading {
	display: none;
}

.hds-contact--smf:has(.snow-monkey-form[data-screen="confirm"]) .hds-contact__heading,
.hds-contact--smf .snow-monkey-form[data-screen="confirm"] :is(.hds-contact-form__policy, .smf-item__description) {
	display: none;
}

.hds-contact--smf:has(.snow-monkey-form[data-screen="confirm"]) .hds-contact__confirm-heading {
	display: block;
}

.hds-contact--smf .snow-monkey-form[data-screen="confirm"] .smf-form .smf-item {
	align-items: start;
}

.hds-contact--smf .snow-monkey-form[data-screen="confirm"] .smf-placeholder {
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(16px * var(--hds-type-scale, 1));
	line-height: 1.5;
	letter-spacing: -0.176px;
	text-align: left;
	word-break: break-word;
}

.hds-contact--smf .snow-monkey-form[data-screen="confirm"] .smf-placeholder[data-name="message"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 280px;
	padding: 18px 21px;
	border: 1px solid #ababab;
	border-radius: 2px;
	white-space: pre-wrap;
}

@media screen and (max-width: 781px) {
	.hds-contact--smf .smf-action {
		margin-top: 24px;
	}

	.hds-contact--smf .smf-item__label {
		font-size: 15px;
	}
}
