/* Capital Sticks: Cast page, one stage that changes sets. Loaded only by templates/cast.php. */
.cast-main {
	min-width: 0;
}

/* tabs: cardstock chips above the stage */
.cast-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 0.5rem;
	margin: 0 0 1.1rem;
	padding: 0;
}
.cast-tab {
	--r: -0.8deg;
	font-family: var(--typed);
	font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
	line-height: 1.1;
	color: var(--ink);
	background: var(--card) url("../img/tex/cardstock.webp");
	background-size: 512px;
	border: 0;
	padding: 0.6rem 0.7rem 0.55rem;
	min-height: 44px;
	box-shadow: 2px 4px 5px var(--shadow);
	rotate: var(--r);
	cursor: pointer;
	transition:
		translate 0.15s,
		background-color 0.15s;
}
.cast-tab:nth-child(even) {
	--r: 0.7deg;
}
.cast-tab:hover {
	translate: 0 -2px;
}
.cast-tab[aria-selected="true"] {
	background: #ffd76a;
	font-weight: 700;
	translate: 0 -3px;
	box-shadow: 3px 7px 8px var(--shadow);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.cast-tab:focus-visible {
	outline: 3px dashed var(--ink);
	outline-offset: 3px;
}

.cast-setnote {
	font-family: var(--typed);
	margin: 0 0 0.8rem;
	max-width: 62ch;
}
.cast-panel[hidden] {
	display: none;
}

/* the stage per set (replaces the #cast-stage rules in style.css for this page) */
.cast-panel {
	--cc: var(--cc-s);
}
.cast-panel .stage {
	--fig-h: clamp(165px, 44vw, 250px);
	padding-top: 8rem;
}
@media (min-width: 640px) {
	.cast-panel {
		--cc: var(--cc-m);
	}
	.cast-panel .stage {
		padding-top: 10.5rem;
	}
}
@media (min-width: 1000px) {
	.cast-panel {
		--cc: var(--cc-l);
	}
	.cast-panel .stage {
		--fig-h: 250px;
	}
}
@media (min-width: 1200px) {
	.cast-panel .stage {
		--fig-h: 245px;
	}
}
/* the set photo is paper too: keep it visible but let the cutouts read */
.cast-panel .stage-bg img {
	object-position: center 55%;
}
.cast-panel .stage-bg::after {
	background: rgba(33, 22, 10, 0.1);
}
/* Studio Staff: Marv, his cart in the middle, Marge */
@media (min-width: 900px) {
	.cast-panel[data-tab="staff"] .shelf {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
		--fig-h: 300px;
	}
	.cast-panel[data-tab="staff"] .stage {
		--fig-h: 310px;
	}
	.cast-panel[data-tab="players"] .stage {
		--fig-h: 255px;
	}
}
.set-prop {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: var(--fig-h, 250px);
	padding: 0 0 22px;
	pointer-events: none;
}
.set-prop::after {
	content: "";
	position: absolute;
	left: -1px;
	right: -1px;
	bottom: 0;
	height: 22px;
	background:
		url("../img/tex/corrugated.webp") left center / auto 100% repeat-x;
	box-shadow: 0 6px 8px -4px rgba(40, 24, 8, 0.55);
}
.set-prop img {
	position: relative;
	z-index: 2;
	height: 72%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	filter: drop-shadow(3px 6px 3px rgba(30, 20, 8, 0.42));
}
/* Jeff's booth sits at the edge, a little smaller than the regulars, ON AIR light and all */
.cast-panel[data-tab="main"] .cast-card[data-key="co-jeff"] .fig img {
	max-width: 100%;
}

/* sticky Playbill beside the stage, always on screen next to whoever was pressed */
@media (min-width: 1000px) {
	.playbill-col {
		align-self: start;
	}
}
.cast-layout .cast-notes {
	margin-top: 2rem;
}

/* phones and tablets: cards as before, with the set as a banner above them */
@media (max-width: 899px) {
	.set-prop {
		display: none;
	}
	.js .cast-panel .stage[data-cast] .stage-bg {
		display: block;
		position: relative;
		inset: auto;
		z-index: 0;
		height: 150px;
		margin: 0 0 1.1rem;
		overflow: hidden;
		border-radius: 3px;
		box-shadow: 2px 4px 6px var(--shadow);
	}
	.js .cast-panel .stage[data-cast] .stage-bg img {
		object-position: center 45%;
	}
	.js .cast-panel[data-tab="tour"] .stage[data-cast] .stage-bg img {
		object-position: center 12%;
	}
	.js .cast-panel[data-tab="s2"] .stage[data-cast] .stage-bg img {
		object-position: center 30%;
	}
	.cast-tabs {
		gap: 0.5rem 0.4rem;
	}
	.cast-tab {
		padding: 0.55rem 0.7rem 0.5rem;
		font-size: 0.92rem;
	}
	.js .cast-layout .cast-notes {
		margin-top: 1.5rem;
	}
}

/* Jeff stands full size like the regulars; his sound booth is a prop beside him, a little smaller than he is */
.set-prop[data-before="co-jeff"] {
	grid-column: span 2;
}
.set-prop[data-before="co-jeff"] img {
	height: 88%;
}

/* 7-across sets: keep long ledge names (Sen. Flipperman) from running into the next label */
@media (min-width: 1000px) {
	.cast-panel .fig .name {
		font-size: 0.74rem;
		padding: 0.18rem 0.32rem;
		letter-spacing: -0.01em;
	}
}
