/* Short card, laid out as Douyin's: the clip fills the stage and everything
   else sits over it. Tokens only (TokenLintTest). */
.c-short-card {
	position: relative; height: 100%; overflow: hidden;
	background: var(--color-on-light);
	scroll-snap-align: start; scroll-snap-stop: always;
}
.c-short-card__backdrop {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	filter: blur(var(--blur-backdrop)) brightness(0.55) saturate(1.2); transform: scale(1.2);
}
.c-short-card__stage { position: absolute; inset: 0; overflow: hidden; }
/* A scrim under the text and controls, so they read over any frame. */
.c-short-card__stage::before {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
	background: var(--scrim-bottom); z-index: 1; pointer-events: none;
}
.c-short-card__stage video, .c-short-card__still {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.c-short-card[data-playing] .c-short-card__still { display: none; }
.c-short-card__paused {
	position: absolute; inset: 0; z-index: 2; display: none; place-items: center;
	color: var(--color-text); pointer-events: none;
}
.c-short-card__paused .icon { filter: drop-shadow(var(--shadow-glyph)); opacity: 0.9; }
.c-short-card[data-paused] .c-short-card__paused { display: grid; }

/* Bottom-left: whose clip it is, and the way into the full episode. */
.c-short-card__info {
	position: absolute; z-index: 3;
	left: var(--space-4); right: calc(var(--short-rail-width) + var(--space-4));
	bottom: var(--space-6);
	display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1-5);
}
.c-short-card__title { font-size: var(--text-l); font-weight: 700; line-height: 1.3; text-shadow: var(--shadow-text); }
.c-short-card__title:hover { text-decoration: underline; text-underline-offset: var(--underline-offset); }
.c-short-card__meta { margin: 0; font-size: var(--text-s); color: var(--color-text-muted); }
.c-short-card__watch { margin-top: var(--space-1-5); }

/* The rail: the drama's poster as an avatar, then sound and share. */
.c-short-card__rail {
	position: absolute; z-index: 3; right: var(--space-2); bottom: var(--space-6);
	width: var(--short-rail-width);
	display: flex; flex-direction: column; align-items: center; gap: var(--short-actions-gap);
}
.c-short-card__avatar {
	width: var(--short-avatar); height: var(--short-avatar);
	border-radius: var(--radius-pill); border: var(--short-avatar-ring) solid var(--color-light);
	overflow: hidden; display: grid; place-items: center; background: var(--color-control);
	transition: transform var(--t-feedback) var(--ease-standard);
}
.c-short-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-short-card__avatar:active { transform: scale(0.94); }
.c-short-card__rail [aria-pressed="true"] .icon { color: var(--color-accent); }

/* Phones: a thin progress line along the bottom edge. */
.c-short-card__progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: var(--short-progress); background: var(--color-hover-wash); }
.c-short-card__progress span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--color-light); }

/* Laptops: a control bar that appears on hover or focus. */
.c-short-card__controls { display: none; }
.c-short-card__ctl {
	width: var(--short-ctl); height: var(--short-ctl); flex: none;
	display: grid; place-items: center; border-radius: var(--radius-pill); color: var(--color-text);
	transition: background var(--t-state);
}
.c-short-card__ctl:hover { background: var(--color-hover-wash); }
.c-short-card__time { flex: none; min-width: 9ch; font-size: var(--text-s); font-weight: 600; font-variant-numeric: tabular-nums; }
.c-short-card__seek { flex: 1; min-width: 0; accent-color: var(--color-accent); cursor: pointer; }
.c-short-card__auto {
	flex: none; padding: var(--space-1) var(--space-2-5); border-radius: var(--radius-pill);
	border: 1px solid var(--color-outline); font-size: var(--text-s); font-weight: 600; color: var(--color-text-muted);
	transition: background var(--t-state), color var(--t-state), border-color var(--t-state);
}
.c-short-card__auto[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text); }

.c-short-card__status {
	position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%);
	margin: 0; padding: var(--space-2) var(--space-3-5); border-radius: var(--radius-s);
	background: var(--color-scrim-strong); font-weight: 600; text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
}
.c-short-card__status[hidden] { display: none; }

/* Loading: a ring until the clip plays (origin misses take seconds). */
.c-short-card[data-loading]:not([data-playing]) .c-short-card__stage::after {
	content: ""; position: absolute; z-index: 2; left: 50%; top: 50%;
	width: var(--short-spinner); height: var(--short-spinner); margin: calc(var(--short-spinner) / -2) 0 0 calc(var(--short-spinner) / -2);
	border: var(--short-spinner-line) solid var(--color-hover-wash); border-top-color: var(--color-text);
	border-radius: var(--radius-pill);
	animation: c-short-spin 0.9s linear infinite;
}
@keyframes c-short-spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
	.c-short-card { background: transparent; }
	/* The stage sits inset with rounded corners, Douyin's player frame. */
	.c-short-card__stage, .c-short-card__backdrop { inset: var(--space-3) 0; border-radius: var(--radius-l); }
	.c-short-card__backdrop { width: 100%; height: calc(100% - 2 * var(--space-3)); transform: none; }
	.c-short-card__info { bottom: calc(var(--space-12) + var(--space-3)); }
	.c-short-card__rail { bottom: calc(var(--space-12) + var(--space-3)); }
	.c-short-card__progress { display: none; }
	.c-short-card__controls {
		position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
		display: flex; align-items: center; gap: var(--space-2-5);
		padding: var(--space-2) var(--space-3);
		opacity: 0; transition: opacity var(--t-state) var(--ease-standard);
	}
	.c-short-card:hover .c-short-card__controls,
	.c-short-card:focus-within .c-short-card__controls,
	.c-short-card[data-paused] .c-short-card__controls { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.c-short-card[data-loading]:not([data-playing]) .c-short-card__stage::after { animation: none; border-top-color: var(--color-hover-wash); }
	.c-short-card__controls { transition: none; }
}
