.pnp {
	--pnp-accent: #e4002b;
	--pnp-text: inherit;
	--pnp-muted: rgba(127, 127, 127, .9);
	--pnp-line: rgba(127, 127, 127, .2);
	--pnp-tile: rgba(127, 127, 127, .15);
	max-width: 640px;
	font: inherit;
	color: var(--pnp-text);
}

/* Now playing card */
.pnp-now {
	display: flex;
	gap: 18px;
	align-items: center;
	padding: 16px;
	border: 1px solid var(--pnp-line);
	border-radius: 12px;
	margin-bottom: 24px;
}
.pnp-now-art {
	flex: 0 0 140px;
	width: 140px;
	height: 140px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--pnp-tile);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.pnp-now-art img,
.pnp-item-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity .4s;
}
.pnp-now-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.pnp-label {
	font-size: .75em;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--pnp-accent);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.pnp-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--pnp-accent);
	animation: pnp-pulse 1.6s infinite;
}
@keyframes pnp-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .25; }
}
.pnp-now-title {
	font-size: 1.4em;
	font-weight: 700;
	line-height: 1.2;
}
.pnp-now-artist {
	font-size: 1.05em;
	color: var(--pnp-muted);
}

/* History */
.pnp-history-heading {
	font-size: 1em;
	margin: 0 0 8px;
}
.pnp-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.pnp-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--pnp-line);
	margin: 0;
}
.pnp-item:last-child {
	border-bottom: 0;
}
.pnp-item-art {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 4px;
	overflow: hidden;
	background: var(--pnp-tile);
}
.pnp-item-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.pnp-item-title,
.pnp-item-artist {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pnp-item-title {
	font-weight: 600;
}
.pnp-item-artist,
.pnp-item-time,
.pnp-empty {
	color: var(--pnp-muted);
	font-size: .9em;
}
.pnp-item-time {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}

.pnp-noart {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	font-size: 2em;
	color: var(--pnp-muted);
}
.pnp-item-art .pnp-noart {
	font-size: 1.2em;
}

@media (max-width: 480px) {
	.pnp-now-art {
		flex-basis: 96px;
		width: 96px;
		height: 96px;
	}
	.pnp-now-title {
		font-size: 1.15em;
	}
}

/* -----------------------------------------------------------------------
 * Ticker style: "Recently played" on one scrolling line
 * -------------------------------------------------------------------- */
.pnp-history--ticker {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 6px 0;
	border-top: 1px solid var(--pnp-line);
	border-bottom: 1px solid var(--pnp-line);
}
.pnp-ticker-label {
	flex: 0 0 auto;
	font-size: .7em;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--pnp-accent);
	white-space: nowrap;
}
.pnp-ticker {
	flex: 1;
	min-width: 0;
	overflow-x: auto;           /* swipe/scroll by hand if animation is off */
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
	        mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.pnp-ticker::-webkit-scrollbar {
	display: none;
}
.pnp-history--ticker .pnp-list {
	display: flex;
	width: max-content;
	align-items: center;
}
.pnp-history--ticker .pnp-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 18px 0 0;
	margin: 0 18px 0 0;
	border: 0;
	border-right: 1px solid var(--pnp-line);
	white-space: nowrap;
	font-size: .9em;
}
.pnp-history--ticker .pnp-item:last-child {
	border-right: 1px solid var(--pnp-line);
}
.pnp-history--ticker .pnp-item-art {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 3px;
}
.pnp-history--ticker .pnp-item-art .pnp-noart {
	font-size: .9em;
}
.pnp-history--ticker .pnp-item-time {
	font-size: .85em;
}
.pnp-history--ticker .pnp-item-artist::before {
	content: "– ";
}
.pnp-history--ticker .pnp-item-artist:empty::before {
	content: none;
}
.pnp-history--ticker .pnp-item-title,
.pnp-history--ticker .pnp-item-artist {
	overflow: visible;
}
.pnp-history--ticker .pnp-empty {
	font-size: .85em;
	white-space: nowrap;
}

/* Animation is switched on by the script once the line is wider than the space. */
.pnp-ticker.pnp-scrolling {
	overflow: hidden;
}
.pnp-ticker.pnp-scrolling .pnp-list {
	animation: pnp-ticker var(--pnp-duration, 60s) linear infinite;
}
.pnp-ticker.pnp-scrolling:hover .pnp-list,
.pnp-ticker.pnp-scrolling:focus-within .pnp-list {
	animation-play-state: paused;
}
@keyframes pnp-ticker {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.pnp-ticker.pnp-scrolling {
		overflow-x: auto;
	}
	.pnp-ticker.pnp-scrolling .pnp-list {
		animation: none;
	}
}

@media (max-width: 480px) {
	.pnp-ticker-label {
		display: none;
	}
}

/* With the ticker, let the widget use the full width it's given. */
.pnp--ticker {
	max-width: none;
}
.pnp--ticker .pnp-now {
	margin-bottom: 12px;
}
