/* ===== Trailer: the main action of the button row ===== */
.ax-trailer-btn {
	align-items: center;
	background: #f97316;
	border: 0;
	border-radius: 8px;
	color: #111;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	gap: 10px;
	height: 50px;
	justify-content: center;
	line-height: 1;
	min-width: 112px;
	padding: 0 24px;
	transition: background-color 0.15s ease, transform 0.1s ease;
}
.ax-trailer-btn:hover { background: #fb923c; }
.ax-trailer-btn:active { transform: scale(0.97); }
.ax-trailer-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ax-trailer-btn svg { flex: none; }

/* ===== Trailer player ===== */
.ax-modal {
	align-items: center;
	background: rgba(0, 0, 0, 0.88);
	display: flex;
	inset: 0;
	justify-content: center;
	position: fixed;
	z-index: 99999;
}
.ax-modal-box { max-width: 960px; position: relative; width: 92vw; }
.ax-modal-box video {
	background: #000;
	border-radius: 10px;
	display: block;
	max-height: 80vh;
	width: 100%;
}
.ax-modal-close {
	align-items: center;
	background: #f4f4f5;
	border: 0;
	border-radius: 50%;
	color: #111;
	cursor: pointer;
	display: flex;
	height: 44px;
	justify-content: center;
	position: absolute;
	right: 0;
	top: -56px;
	width: 44px;
}
.ax-modal-close:hover { background: #fff; }
.ax-modal-close:focus-visible { outline: 2px solid #f97316; outline-offset: 3px; }
html.ax-modal-open { overflow: hidden; }

/* ===== Characters and voice actors ===== */
.ax-characters { margin-top: 40px; }
.ax-heading {
	align-items: center;
	color: #f4f4f5;
	display: flex;
	font-size: 18px;
	font-weight: 700;
	gap: 12px;
	line-height: 1.4;
	margin: 0 0 22px;
}
.ax-heading::before {
	background: #f97316;
	border-radius: 2px;
	content: "";
	flex: none;
	height: 22px;
	width: 4px;
}
.ax-stage { position: relative; }
.ax-track {
	-ms-overflow-style: none;
	display: flex;
	gap: 16px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	padding: 6px 2px 12px;
	scrollbar-width: none;
}
.ax-track::-webkit-scrollbar { display: none; }
.ax-track:focus-visible { outline: 2px solid #f97316; outline-offset: 4px; border-radius: 8px; }
.ax-track.ax-dragging { cursor: grabbing; user-select: none; }
.ax-track { cursor: grab; }
.ax-card {
	align-items: center;
	display: flex;
	flex: 0 0 124px;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	text-align: center;
}
.ax-count { color: #a1a1aa; font-size: 14px; font-weight: 400; }
.ax-avatar {
	align-items: center;
	background: #1c1d1f;
	border: 3px solid #2b2c2f;
	border-radius: 50%;
	display: flex;
	height: 92px;
	justify-content: center;
	overflow: hidden;
	transition: border-color 0.15s ease, transform 0.15s ease;
	width: 92px;
}
.ax-card:hover .ax-avatar { border-color: #f97316; transform: translateY(-2px); }
.ax-main .ax-avatar { border-color: #f97316; }
.ax-avatar img { display: block; height: 100%; object-fit: cover; width: 100%; }
.ax-initial {
	align-items: center;
	color: #fff;
	display: flex;
	font-size: 36px;
	font-weight: 700;
	height: 100%;
	justify-content: center;
	width: 100%;
}
.ax-name {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	color: #f4f4f5;
	direction: ltr;
	display: -webkit-box;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	overflow: hidden;
	overflow-wrap: anywhere;
	text-align: center;
	unicode-bidi: plaintext;
}
.ax-badge {
	border: 1px solid #f97316;
	border-radius: 999px;
	color: #fb923c;
	font-size: 12px;
	line-height: 18px;
	padding: 0 8px;
}
.ax-actor {
	align-items: flex-start;
	color: #a1a1aa;
	direction: ltr;
	display: flex;
	font-size: 12px;
	gap: 4px;
	justify-content: center;
	line-height: 1.5;
	overflow-wrap: anywhere;
	text-align: center;
}
.ax-actor svg { flex: none; margin-top: 3px; }
/* Loading skeleton: the space is reserved, so the page does not jump when the data arrives. */
.ax-skel .ax-avatar,
.ax-skel .ax-line {
	animation: axPulse 1.4s ease-in-out infinite;
	background: linear-gradient(90deg, #1c1d1f, #28292d, #1c1d1f);
	background-size: 200% 100%;
	border-color: transparent;
}
.ax-skel .ax-line { border-radius: 6px; height: 12px; width: 80%; }
.ax-skel .ax-line-short { width: 50%; }
@keyframes axPulse { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) {
	.ax-skel .ax-avatar, .ax-skel .ax-line { animation: none; }
	.ax-trailer-btn, .ax-avatar { transition: none; }
}

@media (max-width: 640px) {
	.ax-trailer-btn { height: 48px; padding: 0 18px; }
	.ax-track { gap: 12px; }
	.ax-card { flex-basis: calc((100% - 24px) / 3.3); }
	.ax-avatar { height: 84px; width: 84px; }
}

/* ===== Characters link to their voice actor's page ===== */
a.ax-card { color: inherit; text-decoration: none; }
a.ax-card:focus-visible { outline: 2px solid #f97316; outline-offset: 4px; border-radius: 10px; }
a.ax-card:hover .ax-name { color: #fb923c; }

/* ===== Voice actor page (/actor/{id}-{name}/) ===== */
.ax-actor-page { color: #efefef; margin: 0 auto; max-width: 1200px; padding: 32px 16px 64px; }
.ax-actor-head { align-items: center; display: flex; gap: 28px; margin-bottom: 40px; }
.ax-actor-photo {
	align-items: center;
	background: #1c1d1f;
	border: 4px solid #f97316;
	border-radius: 50%;
	box-shadow: 8px 8px 0 #7c3aed;
	display: flex;
	flex: none;
	height: 132px;
	justify-content: center;
	overflow: hidden;
	width: 132px;
}
.ax-actor-photo img { height: 100%; object-fit: cover; width: 100%; }
.ax-actor-photo .ax-initial { background: #4c3a8f; font-size: 56px; }
.ax-actor-kicker { color: #fb923c; font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.ax-actor-title h1 { color: #f4f4f5; font-size: 32px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; text-align: right; }
.ax-actor-count { color: #a1a1aa; font-size: 16px; margin: 0; }
.ax-works { display: grid; gap: 28px 18px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.ax-work { color: inherit; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; }
.ax-work-poster {
	aspect-ratio: 400 / 565;
	background: #1c1d1f;
	border: 3px solid #2b2c2f;
	border-radius: 10px;
	display: block;
	overflow: hidden;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.ax-work-poster img { display: block; height: 100%; object-fit: cover; width: 100%; }
.ax-work:hover .ax-work-poster { border-color: #f97316; transform: translateY(-3px); }
.ax-work:focus-visible { outline: 2px solid #f97316; outline-offset: 4px; border-radius: 10px; }
.ax-work-title { color: #f4f4f5; font-size: 14px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.ax-work-year { color: #a1a1aa; font-size: 12px; }
.ax-work-role { align-items: center; color: #d4d4d8; display: flex; flex-wrap: wrap; font-size: 12px; gap: 6px; }
.ax-work-role img { border: 2px solid #f97316; border-radius: 50%; height: 28px; object-fit: cover; width: 28px; }
.ax-more-roles { border: 1px solid #52525b; border-radius: 999px; color: #a1a1aa; font-size: 12px; padding: 0 8px; }
.ax-actor-empty { margin: 64px auto; max-width: 520px; text-align: center; }
.ax-actor-empty h1 { font-size: 24px; margin-bottom: 12px; }
.ax-actor-empty p { color: #a1a1aa; margin-bottom: 24px; }
.ax-actor-empty .ax-trailer-btn { text-decoration: none; }
@media (max-width: 640px) {
	.ax-actor-head { gap: 18px; }
	.ax-actor-photo { height: 96px; width: 96px; }
	.ax-actor-title h1 { font-size: 24px; }
	.ax-works { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ===== Whole cards only ===== */
.ax-track.ax-fit { gap: var(--ax-gap, 16px); scroll-snap-type: x proximity; }
.ax-track.ax-fit .ax-card {
	flex: 0 0 calc((100% - (var(--ax-n) - 1) * var(--ax-gap, 16px)) / var(--ax-n));
	scroll-snap-align: start;
}
@media (max-width: 640px) {
	.ax-track.ax-fit .ax-card { flex-basis: calc((100% - (var(--ax-n) - 1) * var(--ax-gap, 16px)) / var(--ax-n)); }
}
