/**
 * Works archive (一覧 ALL) — Figma 133:1469
 */

/* Shell: no left paper sidebar — header + full-width main */
.hds-shell--archive {
	display: block;
	grid-template-columns: none;
	max-width: 1280px;
	margin: 0 auto;
	min-height: 100vh;
}

.hds-shell--archive > * + * {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}

.hds-shell__aside--archive {
	position: static;
	width: 100%;
	max-width: none;
	min-height: 0;
	padding: 0;
	gap: 0;
	background-color: transparent;
}

.hds-shell__aside--archive .hds-header {
	width: 100%;
}

.hds-shell__main--archive {
	width: 100%;
	max-width: none;
	min-width: 0;
	padding: 0;
	box-sizing: border-box;
}

.hds-works-archive {
	width: 100%;
	padding: 53px 92px 80px;
	box-sizing: border-box;
	/* 詳細と同じ 1200 / 1400 / 1600。基準 1096 は Figma 一覧幅 */
	--hds-archive-rail: calc(1096px * 800 / 880);
	--hds-archive-company-rail: calc(719px * 800 / 880);
}

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

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

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

/* Toolbar: Works + filters | search */
.hds-works-archive__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin: 0 0 72px;
}

.hds-works-archive--company .hds-works-archive__toolbar {
	margin-bottom: 40px;
}

.hds-works-archive__toolbar:has(.hds-works-archive__active-cats) {
	row-gap: 24px;
}

.hds-works-archive__heading-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: calc(27px * var(--hds-type-scale, 1));
	min-width: 0;
}

.hds-works-archive__title {
	margin: 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-works-archive__title a {
	color: inherit;
	text-decoration: none;
}

.hds-works-archive__title a:hover,
.hds-works-archive__title a:focus {
	opacity: 0.7;
}

.hds-works-archive__filters {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: calc(12.224px * var(--hds-type-scale, 1));
	min-width: 0;
}

.hds-works-archive .hds-brand-filters__all {
	width: calc(61.935px * var(--hds-type-scale, 1));
}

.hds-works-archive .hds-brand-filters__list {
	gap: calc(12px * var(--hds-type-scale, 1));
}

.hds-works-archive .hds-brand-filters__item {
	width: calc(68.186px * var(--hds-type-scale, 1));
	height: calc(52.844px * var(--hds-type-scale, 1));
}

/* Search button — Figma 310:286 137×30 / border #bbb */
.hds-works-archive__search {
	display: inline-flex;
	align-items: center;
	width: auto;
	height: calc(30px * var(--hds-type-scale, 1));
	margin: 0;
	padding: 0 calc(10px * var(--hds-type-scale, 1)) 0 0;
	box-sizing: border-box;
	border: 1px solid #bbb;
	border-radius: 2px;
	background: transparent;
	color: #333333;
	flex-shrink: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
}

.hds-works-archive__search:hover {
	border-color: #333;
}

.hds-works-archive__search.is-active {
	border-color: #333;
}

/* Selected category chips — Figma 326:973 */
.hds-works-archive__active-cats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	width: 100%;
	flex-basis: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hds-works-archive__active-cat {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 14px;
	box-sizing: border-box;
	border: 1px solid #333333;
	border-radius: 40px;
	background-color: rgba(255, 255, 255, 0.45);
	color: #333333;
	font-family: "EB Garamond", "Noto Serif JP", serif;
	font-size: calc(14px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 2.1;
	white-space: nowrap;
}

.hds-works-archive__search-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(28px * var(--hds-type-scale, 1));
	height: calc(28px * var(--hds-type-scale, 1));
	flex-shrink: 0;
	pointer-events: none;
}

.hds-works-archive__search-icon img {
	display: block;
	width: calc(12.444px * var(--hds-type-scale, 1));
	height: calc(12.444px * var(--hds-type-scale, 1));
}

.hds-works-archive__search-label {
	font-family: "Cormorant Garamond", "EB Garamond", serif;
	font-size: calc(14px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 2.1;
	white-space: nowrap;
}

/* Category modal — Figma 310:294 */
.hds-works-cat {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.hds-works-cat[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.hds-works-cat::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

body.hds-works-cat-open {
	overflow: hidden;
}

.hds-works-cat__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(914px, calc(100% - 48px));
	min-height: calc(486px * var(--hds-type-scale, 1));
	padding: calc(57px * var(--hds-type-scale, 1)) calc(97px * var(--hds-type-scale, 1)) calc(50px * var(--hds-type-scale, 1));
	box-sizing: border-box;
	background: #fff;
}

.hds-works-cat__close {
	position: absolute;
	top: calc(21px * var(--hds-type-scale, 1));
	right: calc(40px * var(--hds-type-scale, 1));
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 19px;
	height: 19px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	outline: none;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
	appearance: none;
	-webkit-appearance: none;
}

.hds-works-cat__close:focus,
.hds-works-cat__close:focus-visible,
.hds-works-cat__close:active {
	outline: none;
	box-shadow: none;
}

.hds-works-cat__close img {
	display: block;
	width: 19px;
	height: 19px;
}

.hds-works-cat__title {
	margin: 0 0 calc(32px * var(--hds-type-scale, 1));
	color: #333333;
	font-family: "Cormorant Garamond", "EB Garamond", serif;
	font-size: calc(24px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 2.1;
	text-align: center;
	outline: none;
}

.hds-works-cat__form {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.hds-works-cat__list {
	display: grid;
	grid-template-columns: repeat(3, max-content);
	justify-content: space-between;
	row-gap: calc(18px * var(--hds-type-scale, 1));
	width: min(563px, 100%);
	margin: 0 0 calc(48px * var(--hds-type-scale, 1));
	padding: 0;
	list-style: none;
}

.hds-works-cat__item {
	margin: 0;
}

.hds-works-cat__label {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #333333;
	font-family: "EB Garamond", "Cormorant Garamond", serif;
	font-size: calc(12px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 2.1;
	white-space: nowrap;
	cursor: pointer;
}

.hds-works-cat__check {
	appearance: none;
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background-color: #d9d9d9;
	flex-shrink: 0;
	cursor: pointer;
	position: relative;
}

.hds-works-cat__check:checked::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 3px;
	width: 7px;
	height: 12px;
	border: solid #333;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.hds-works-cat__submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(728px, 100%);
	min-height: calc(74px * var(--hds-type-scale, 1));
	padding: 10px;
	box-sizing: border-box;
	border: 1px solid #000;
	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;
	appearance: none;
	-webkit-appearance: none;
}

.hds-works-cat__submit:hover,
.hds-works-cat__submit:focus-visible {
	background-color: rgba(255, 255, 255, 0.2);
}

.hds-works-cat__submit-corner {
	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;
}

/* Grid — 3 cols / thumb 3:2 / col gap ~42 */
.hds-works-archive__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: calc(42px * var(--hds-type-scale, 1));
	row-gap: calc(36px * var(--hds-type-scale, 1));
	margin: 0;
	padding: 0;
	list-style: none;
}

.hds-works-archive__item {
	position: relative;
	margin: 0;
	min-width: 0;
}

.hds-works-archive__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.hds-works-archive__card:hover .hds-works-archive__card-text,
.hds-works-archive__card:focus .hds-works-archive__card-text {
	opacity: 0.7;
}

.hds-works-archive__pin {
	/* Hidden for now; keep rules so the pin can be restored. */
	display: none;
	position: absolute;
	left: -7px;
	top: -36px;
	z-index: 2;
	width: 80px;
	height: 100px;
	object-fit: contain;
	pointer-events: none;
	transform: scale(calc(0.5 * var(--hds-type-scale, 1)));
	transform-origin: 20px 47px; /* 針先（80×100 アセット内） */
}

.hds-works-archive__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background-color: transparent;
	border: 0;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hds-works-archive__card:hover .hds-works-archive__media,
.hds-works-archive__card:focus .hds-works-archive__media,
.hds-works-archive__card:focus-within .hds-works-archive__media {
	border-color: #fff;
	box-shadow: 0 0 0 1px #fff, 0 0 8px rgba(255, 255, 255, 0.75);
}

.hds-works-archive__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.hds-works-archive__media img.hds-works-card-logo {
	position: absolute;
	top: 50%;
	left: 50%;
	width: auto;
	height: auto;
	max-width: 62%;
	max-height: 58%;
	object-fit: contain;
	transform: translate(-50%, -50%);
}

.hds-works-archive__media .hds-company-works__fallback-label {
	font-size: calc(12px * var(--hds-type-scale, 1));
}

.hds-works-archive__card-text {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.hds-works-archive__card-subtitle,
.hds-works-archive__card-title {
	margin: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(12.443px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.8;
	text-align: left;
	word-break: break-word;
}

/* Company profile — Figma 133:1601 */
.hds-works-archive__company {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 29px;
	width: 100%;
	max-width: var(--hds-archive-company-rail);
	margin: 0 0 48px;
}

.hds-works-archive__company-identity {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.hds-works-archive__company-logo {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 126px;
	min-height: 52px;
	flex-shrink: 0;
}

.hds-works-archive__company-logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 52px;
	object-fit: contain;
}

@media screen and (min-width: 782px) {
	.hds-works-archive__company-logo {
		width: 252px;
		min-height: 104px;
	}

	.hds-works-archive__company-logo img {
		max-height: 104px;
	}

	.hds-works-archive__company-legal {
		display: none;
	}
}

.hds-works-archive__company-name {
	margin: 0;
	color: #333333;
	font-family: "EB Garamond", "Cormorant Garamond", serif;
	font-size: calc(28px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.06em;
}

.hds-works-archive__company-legal {
	margin: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(12px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.8;
}

.hds-works-archive__company-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hds-works-archive__company-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-width: 0;
	padding: 10px 0;
	border-bottom: 1px solid #535353;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(13px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.8;
	text-decoration: none;
	white-space: nowrap;
}

a.hds-works-archive__company-link:hover,
a.hds-works-archive__company-link:focus {
	opacity: 0.7;
}

.hds-works-archive__company-link img {
	display: block;
	width: 17px;
	height: 17px;
	flex-shrink: 0;
}

.hds-works-archive__company-desc {
	flex: 1 0 100%;
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	width: 100%;
	margin: 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(14px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 2.1;
	letter-spacing: -0.011em;
	text-align: justify;
	text-justify: inter-ideograph;
}

.hds-works-archive__company-desc-name {
	margin: 0;
	font-weight: 700;
	line-height: 1.6;
	text-align: left;
}

.hds-works-archive__company-desc-body {
	margin: 0;
}

.hds-works-archive__thumbs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1px;
	width: 100%;
	margin: 0;
}

.hds-works-archive__thumb {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background-color: transparent;
	border: 0;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hds-works-archive__card:hover .hds-works-archive__thumb,
.hds-works-archive__card:focus .hds-works-archive__thumb,
.hds-works-archive__card:focus-within .hds-works-archive__thumb {
	border-color: #fff;
	box-shadow: 0 0 0 1px #fff, 0 0 8px rgba(255, 255, 255, 0.75);
}

.hds-works-archive__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.hds-works-archive__more {
	display: flex;
	justify-content: center;
	margin: 48px 0 0;
}

.hds-works-archive__more-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 10px 30px;
	border: 0;
	border-bottom: 1px solid #535353;
	border-radius: 0;
	background: transparent;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(15px * var(--hds-type-scale, 1));
	font-weight: 400;
	line-height: 1.8;
	text-decoration: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.hds-works-archive__more-link:hover,
.hds-works-archive__more-link:focus {
	opacity: 0.7;
}

.hds-works-archive__more-link:disabled {
	opacity: 0.45;
	cursor: wait;
}

/* Kept for restore via hds_works_archive_show_empty_message filter. */
.hds-works-archive__empty {
	margin: 48px 0 0;
	color: #333333;
	font-family: "Noto Serif JP", serif;
	font-size: calc(14px * var(--hds-type-scale, 1));
	line-height: 1.8;
	text-align: left;
}

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

	.hds-works-archive__toolbar {
		margin-bottom: 48px;
	}

	.hds-works-archive--company .hds-works-archive__toolbar {
		margin-bottom: 28px;
	}

	.hds-works-archive__list {
		column-gap: 28px;
		row-gap: 28px;
	}
}

@media screen and (max-width: 781px) {
	.hds-shell--archive {
		max-width: none;
	}

	.hds-works-archive {
		padding: 24px 24px 48px;
	}

	.hds-works-archive__toolbar {
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center;
		column-gap: 12px;
		row-gap: 16px;
		margin-bottom: 36px;
	}

	.hds-works-archive--company .hds-works-archive__toolbar {
		margin-bottom: 20px;
	}

	.hds-works-archive__toolbar:has(.hds-works-archive__active-cats) {
		row-gap: 12px;
	}

	.hds-works-archive__heading-row {
		display: contents;
	}

	.hds-works-archive__title {
		grid-column: 1;
		grid-row: 1;
		font-size: calc(36px * var(--hds-type-scale, 1));
	}

	.hds-works-archive__search {
		grid-column: 2;
		grid-row: 1;
		width: auto;
		max-width: none;
		justify-self: end;
		align-self: center;
	}

	.hds-works-archive__filters {
		grid-column: 1 / -1;
		grid-row: 2;
		flex-wrap: nowrap;
		justify-content: flex-start;
		width: 100%;
		min-width: 0;
	}

	.hds-works-archive__active-cats {
		grid-column: 1 / -1;
		grid-row: 3;
		flex-basis: auto;
		gap: 8px;
		width: 100%;
	}

	.hds-works-archive__active-cat {
		padding: 0 12px;
		font-size: calc(12px * var(--hds-type-scale, 1));
	}

	.hds-works-archive__filters .hds-brand-filters__list {
		flex: 1 1 auto;
		flex-wrap: nowrap;
		width: auto;
		min-width: 0;
	}

	.hds-works-archive .hds-brand-filters__all {
		width: auto;
		flex: 0 0 auto;
		padding: 0 4px;
	}

	.hds-works-archive .hds-brand-filters__list {
		gap: 8px;
	}

	.hds-works-archive .hds-brand-filters__item {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
		max-width: 56px;
		height: auto;
		aspect-ratio: 56 / 44;
	}

	.hds-works-cat {
		padding: 24px;
		box-sizing: border-box;
	}

	.hds-works-cat__panel {
		width: max-content;
		max-width: 100%;
		min-width: 220px;
		min-height: 0;
		padding: 32px 28px 40px;
	}

	.hds-works-cat__close {
		top: 12px;
		right: 14px;
	}

	.hds-works-cat__title {
		margin-bottom: 16px;
		font-size: 18px;
		line-height: 1.2;
	}

	.hds-works-cat__list {
		grid-template-columns: 1fr;
		justify-content: start;
		width: 100%;
		row-gap: 10px;
		margin-bottom: 16px;
	}

	.hds-works-cat__label {
		font-size: 11px;
		gap: 8px;
	}

	.hds-works-cat__check {
		width: 18px;
		height: 18px;
	}

	.hds-works-cat__check:checked::after {
		left: 5px;
		top: 2px;
		width: 5px;
		height: 10px;
	}

	.hds-works-cat__submit {
		width: 100%;
		min-height: 44px;
		font-size: 14px;
	}

	.hds-works-archive__list {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.hds-works-archive__pin,
	.hds-works-archive--company .hds-works-archive__pin {
		left: -2px;
		top: -26px;
		width: 56px;
		height: 70px;
		transform: scale(0.8);
		transform-origin: 25% 47%; /* 針先 */
	}

	.hds-works-archive__card-subtitle,
	.hds-works-archive__card-title {
		font-size: calc(13px * var(--hds-type-scale, 1));
	}

	.hds-works-archive__company {
		flex-direction: column;
		align-items: center;
		gap: 16px;
		max-width: none;
		margin-bottom: 64px;
	}

	.hds-works-archive__company-identity {
		flex-direction: column;
		align-items: center;
		gap: 8px;
		width: 100%;
		order: 1;
	}

	.hds-works-archive__company-logo {
		width: calc(213px * 0.9);
		min-height: 0;
		justify-content: center;
	}

	.hds-works-archive__company-logo img {
		max-height: calc(160px * 0.9);
	}

	.hds-works-archive__company-legal {
		font-size: calc(18px * var(--hds-type-scale, 1));
		line-height: 1.8;
		text-align: center;
	}

	.hds-works-archive__company-desc {
		order: 2;
		flex: 0 0 auto;
		width: calc(min(780px, 100vw - (var(--hds-content-gutter, 55px) * 2)) - 8px);
		max-width: 100%;
		margin-bottom: 8px;
		font-weight: 400;
		font-size: calc(14px * var(--hds-type-scale, 1));
		line-height: 1.8;
		letter-spacing: 1.12px;
	}

	.hds-works-archive__company-desc-name {
		text-align: center;
	}

	.hds-works-archive__company-links {
		order: 3;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		justify-content: flex-start;
		width: calc(min(780px, 100vw - (var(--hds-content-gutter, 55px) * 2)) - 8px);
		max-width: 100%;
		gap: 0;
	}

	.hds-works-archive__company-links > li {
		flex: 0 0 auto;
		width: 100%;
		min-width: 0;
		margin: 0;
	}

	.hds-works-archive__company-link {
		width: 100%;
		gap: 6px;
		padding: 10px 4px;
		font-size: calc(14px * var(--hds-type-scale, 1));
	}
}
