.file {
	width: 100%;
}

.togglable:not(.displayed) {
	display: none;
}

.error {
	font-weight: bold;
	color: red;
}

@media (min-width: 400px) {
	.flattened-image-container {
		padding: 0 12px;
	}

	.layers-result {
		padding: 0 12px;
	}

	.layers {
		border-left: 1px solid #ccc;
		border-right: 1px solid #ccc;
	}
}

.flattened-image {
	width: 100%;
	max-width: 400px;
	height: auto;
}

.layers {
	border: 1px solid #dfe4f7;
	border-radius: 16px;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(25, 30, 60, 0.08);
}

.layer {
	display: grid;
	grid-template-columns: 28px auto 56px 1fr;
	align-items: center;
	min-height: 54px;
	border-bottom: 1px solid #eef1f7;
	padding: 4px 10px;
	background: #fff;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

.layer:nth-child(even) {
	background: #fafbff;
}

.layer:hover {
	background: #f0f4ff;
	box-shadow: inset 0 0 0 1px #d7defd;
}

.layer--group {
	background: #f5f7ff;
}

.layer--group .layer__name {
	font-weight: 700;
}

.layer__visible {
	flex: none;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 22px;
	border-right: 1px solid #eee;
	color: #6a6f95;
}

.layer__indents {
	flex: none;
	display: flex;
}

.layer__indent {
	width: 16px;
	border-left: 1px dashed #d7def2;
}

.layer__image {
	flex: none;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 48px;
}

.layer__image--group {
	width: 48px;
}

.layer__image--layer {
	width: 48px;
}

.layer__image img {
	max-width: 46px;
	max-height: 46px;
	width: auto;
	height: auto;
	border: 1px solid #cfd6f0;
	border-radius: 6px;
	background: #fff;
}

.layer__main {
	flex: auto;
	display: flex;
	flex-direction: column;
	white-space: nowrap;
	overflow: hidden; /* メモ: 子孫要素で text-overflow: ellipsis; するために必要 */
	gap: 2px;
}

.layer__compositing {
	flex: 1;
	display: flex;
	gap: 8px;
	align-items: center;
}

.layer__opacity {
	padding: 2px 8px;
	border-radius: 999px;
	background: #eef1ff;
	color: #3a3f7a;
	font-size: 12px;
	font-weight: 600;
}

.layer__blending-mode {
	flex: auto;
	margin-left: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 12px;
	color: #6a6f95;
}

.layer__name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 14px;
	color: #2f3355;
}
