.fm320-history {
	--pink: #e60155;
	--blue: #0059e7;
	--ink: #16171b;
	--muted: #777c86;
	--line: #e9ebef;
	--surface: #fff;
	--soft: #f5f6f8;
	width: 100%;
	color: var(--ink);
	font: 15px/1.5 Arial, Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.fm320-history * { box-sizing: border-box; }

.fm320-history__days {
	display: grid;
	grid-template-columns: repeat(7, minmax(92px, 1fr));
	gap: 6px;
	margin-bottom: 30px;
	padding: 6px;
	overflow-x: auto;
	background: var(--soft);
	border: 1px solid var(--line);
	border-radius: 4px;
	scrollbar-width: thin;
}

.fm320-history__days a {
	min-width: 92px;
	padding: 11px 10px 9px;
	color: var(--muted);
	text-align: center;
	text-decoration: none;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	border-radius: 3px;
	transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.fm320-history__days a:hover {
	color: var(--pink);
	background: var(--surface);
}

.fm320-history__days a.is-active {
	color: #fff;
	background: linear-gradient(135deg, var(--pink), #bb0045);
	box-shadow: 0 8px 20px rgba(230, 1, 85, .18);
}

.fm320-history__days small {
	display: block;
	margin-top: 1px;
	font-size: .68rem;
	font-weight: 500;
	letter-spacing: .02em;
	opacity: .82;
}

.fm320-history__day-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--pink);
}

.fm320-history .fm320-history__day-heading h3 {
	margin: 0;
	color: var(--ink);
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.fm320-history__day-heading span {
	color: var(--muted);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.fm320-history__tracks {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 76px;
	list-style: none;
	margin: 0;
	padding: 34px 42px 58px;
	color: var(--ink);
	background: var(--surface);
	border-radius: 8px;
}

.fm320-history__tracks::before {
	position: absolute;
	top: 22px;
	bottom: 22px;
	left: 50%;
	width: 2px;
	background: linear-gradient(180deg, var(--pink), var(--blue));
	transform: translateX(-50%);
	content: "";
}

.fm320-history__tracks li {
	position: relative;
	display: grid;
	grid-template-columns: 72px 76px minmax(0, 1fr);
	gap: 18px;
	align-items: center;
	min-height: 100px;
	margin: 0;
	padding: 12px 18px 12px 0;
	background: var(--surface);
	border: 1px solid #dfe2e8;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(22, 23, 27, .07);
	transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.fm320-history__tracks li::before {
	position: absolute;
	top: 50%;
	width: 38px;
	height: 2px;
	background: #cfd3da;
	transform: translateY(-50%);
	content: "";
}

.fm320-history__tracks li::after {
	position: absolute;
	top: 50%;
	width: 12px;
	height: 12px;
	background: var(--pink);
	border: 3px solid var(--surface);
	border-radius: 50%;
	transform: translateY(-50%);
	content: "";
}

.fm320-history__tracks li:nth-child(odd)::before { right: -39px; }
.fm320-history__tracks li:nth-child(odd)::after { right: -45px; }
.fm320-history__tracks li:nth-child(even)::before { left: -39px; }
.fm320-history__tracks li:nth-child(even)::after {
	left: -45px;
	background: var(--blue);
}

.fm320-history__tracks li:nth-child(even) {
	transform: translateY(24px);
}

.fm320-history__tracks li:hover {
	background-color: #eceef1;
	border-radius: 8px;
	transform: translateX(12px);
	box-shadow: -4px 0 0 var(--pink), 0 12px 26px rgba(22, 23, 27, .14);
}

.fm320-history__tracks li:nth-child(even):hover {
	transform: translate(12px, 24px);
}

.fm320-history__tracks time {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	margin-top: 5px;
	color: var(--pink);
	font-size: .8rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	border-right: 2px solid var(--pink);
}

.fm320-history__date {
	margin-bottom: 1px;
	color: var(--muted);
	font-size: .65rem;
	font-weight: 700;
	line-height: 1.1;
}

.fm320-history__time {
	display: block;
	line-height: 1.2;
}

.fm320-history__cover {
	position: relative;
	width: 76px;
	height: 76px;
	margin: 0;
	overflow: hidden;
	background: linear-gradient(135deg, var(--pink), var(--blue));
	border-radius: 4px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
}

.fm320-history__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fm320-history__cover > span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 900;
	letter-spacing: -.08em;
}

.fm320-history__track-info {
	min-width: 0;
	overflow: hidden;
}

.fm320-history__track-info strong {
	display: block;
	color: var(--ink);
	font-size: .9rem;
	font-weight: 800;
	line-height: 1.35;
	text-transform: uppercase;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.fm320-history__track-info > span {
	display: block;
	margin-top: 3px;
	color: var(--muted);
	font-size: .78rem;
	text-transform: uppercase;
	white-space: normal;
	overflow-wrap: anywhere;
}

.fm320-history__empty {
	margin: 0;
	padding: 34px;
	color: var(--muted);
	text-align: center;
	background: var(--soft);
	border: 1px solid var(--line);
	border-radius: 4px;
}

.fm320-history--last-12-hours {
	background: transparent;
}

.fm320-history--last-12-hours .fm320-history__tracks {
	width: min(100%, 1260px);
	margin-right: auto;
	margin-left: auto;
	background: transparent;
}

.fm320-history--last-12-hours .fm320-history__track-info {
	text-align: center;
}

.fm320-history--last-12-hours .fm320-history__tracks time {
	min-height: 46px;
}

.fm320-history--last-12-hours .fm320-history__tracks li {
	background: transparent;
}

.fm320-history--last-12-hours .fm320-history__tracks li:hover {
	background-color: #eceef1;
}

.fm320-history--last-12-hours .fm320-history__empty {
	width: min(100%, 1260px);
	margin-right: auto;
	margin-left: auto;
	background: transparent;
}

@media (min-width: 721px) {
	.fm320-history--last-12-hours .fm320-history__tracks {
		gap: 24px 96px;
		padding-right: 54px;
		padding-left: 54px;
	}
}

@media (max-width: 720px) {
	.fm320-history__days { grid-template-columns: repeat(7, 98px); }
	.fm320-history__day-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}

	.fm320-history__tracks {
		grid-template-columns: 1fr;
		gap: 18px;
		padding: 30px 16px 30px 48px;
	}

	.fm320-history__tracks::before {
		top: 18px;
		bottom: 18px;
		left: 24px;
	}

	.fm320-history__tracks li:nth-child(n)::before {
		right: auto;
		left: -25px;
		width: 24px;
	}

	.fm320-history__tracks li:nth-child(n)::after {
		right: auto;
		left: -31px;
	}

	.fm320-history__tracks li:nth-child(even) {
		transform: none;
	}

	.fm320-history__tracks li:nth-child(even):hover {
		transform: translateX(12px);
	}
}

@media (max-width: 480px) {
	.fm320-history__tracks li {
		grid-template-columns: 54px 58px minmax(0, 1fr);
		gap: 10px;
		min-height: 82px;
		padding-right: 6px;
	}
	.fm320-history__cover {
		width: 58px;
		height: 58px;
	}
	.fm320-history__tracks time { font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
	.fm320-history__tracks li,
	.fm320-history__days a {
		transition: none;
	}
	.fm320-history__tracks li:hover { transform: none; }
	.fm320-history__tracks li:nth-child(even),
	.fm320-history__tracks li:nth-child(even):hover { transform: none; }
}
