/**
 * Left-rail featured works carousel.
 * Thumbs locked to 4:3 via padding-bottom (Safari-safe).
 */

.stage-works {
	flex: 0 0 auto;
	width: 100%;
	margin: 0 0 16px;
	min-width: 0;
}

.stage-works__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 0 4px 10px;
}

.stage-works__label {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: #666;
}

.stage-works__count {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: #999;
	font-variant-numeric: tabular-nums;
}

.stage-works__viewport {
	overflow: hidden;
	width: 100%;
}

.stage-works__track {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: max-content;
	box-sizing: content-box;
	will-change: transform;
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-works__card {
	flex: 0 0 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.stage-works__meta {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: #666;
	padding: 0 2px;
}

/* 4:3 — padding-bottom lock (content-box; survives flex/Safari/cache fights) */
.stage-works__media {
	position: relative;
	display: block;
	width: 100%;
	height: 0 !important;
	padding: 0 !important;
	padding-bottom: 75% !important; /* height = width × 3/4 → 4:3 */
	overflow: hidden;
	border-radius: 8px;
	background: #ece8e2;
	border: 1px solid #d4d0c8;
	flex: none;
	box-sizing: content-box !important;
	aspect-ratio: unset !important;
}

.stage-works__media > img,
.stage-works__fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.stage-works__media > img {
	object-fit: cover;
	object-position: top center;
}

.stage-works__fallback {
	display: grid;
	place-items: center;
	padding: 18px;
	background:
		radial-gradient(circle at 85% 12%, var(--accent, #eaff00) 0 42%, transparent 43%),
		linear-gradient(160deg, #f4f1ea, #e4dfd6);
}

.stage-works__fallback strong {
	position: relative;
	z-index: 1;
	font-size: clamp(18px, 2.2vw, 26px);
	line-height: 1.25;
	letter-spacing: -0.06em;
	text-align: center;
	font-weight: 900;
}

.stage-works__title {
	font-size: 12px;
	font-weight: 800;
	line-height: 1.45;
	letter-spacing: -0.03em;
	padding: 0 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.stage-works__card:hover .stage-works__media {
	border-color: #111;
}

.stage-works__card:focus-visible {
	outline: 3px solid #111;
	outline-offset: 3px;
}

.stage-works__card[aria-current="true"] .stage-works__media {
	border-color: #111;
}

@media (prefers-reduced-motion: reduce) {
	.stage-works__track {
		transition: none;
	}
}
