.pfm-archive {
	--pfm-accent: #176192;
	--pfm-accent-tint: #f1fdff;
	max-width: 800px;
	margin: 0 auto;
	font-size: 15px;
}

.pfm-title {
	margin-bottom: 0.75em;
}

/* Sticky player bar */
.pfm-player-bar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 0.85em;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 0.6em 0.9em;
	margin-bottom: 1em;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pfm-player-art img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.pfm-player-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35em;
}

.pfm-player-info {
	min-width: 0;
}

.pfm-player-title {
	font-weight: 600;
	font-size: 0.95em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pfm-player-presenter {
	font-size: 0.8em;
	color: #656565;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pfm-player-controls {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.pfm-play-toggle {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	background: #222;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8em;
}

.pfm-play-toggle:disabled {
	background: #bbb;
	cursor: default;
}

.pfm-icon-pause {
	letter-spacing: -2px;
}

.pfm-seek {
	flex: 1;
	min-width: 60px;
}

.pfm-time-current,
.pfm-time-duration {
	font-size: 0.78em;
	color: #656565;
	min-width: 2.5em;
	text-align: center;
}

.pfm-volume {
	width: 70px;
	flex: 0 0 auto;
}

.pfm-month-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5em 0;
	margin-bottom: 1em;
	border-bottom: 1px solid #ddd;
}

.pfm-month-nav .pfm-current-month {
	font-weight: 600;
	text-transform: capitalize;
}

.pfm-month-nav .pfm-nav-link {
	text-decoration: none;
}

.pfm-episode-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pfm-episode {
	display: flex;
	gap: 1em;
	padding: 1em 0;
	border-bottom: 1px solid #eee;
}

.pfm-episode-image img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.pfm-episode-body {
	flex: 1;
	min-width: 0;
}

.pfm-episode-meta {
	font-size: 0.85em;
	color: #656565;
	display: flex;
	gap: 0.75em;
	flex-wrap: wrap;
	margin-bottom: 0.25em;
}

.pfm-episode-title {
	margin: 0 0 0.25em;
	font-size: 1.05em;
}

.pfm-presenter {
	margin: 0 0 0.5em;
	color: #444;
	font-size: 0.9em;
}

.pfm-episode-actions {
	display: flex;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
}

.pfm-play-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	border: 1px solid #ccc;
	background: #fafafa;
	border-radius: 20px;
	padding: 0.35em 0.9em;
	font-size: 0.85em;
	cursor: pointer;
}

.pfm-play-btn:hover {
	background: #f0f0f0;
}

.pfm-play-btn .pfm-icon-play,
.pfm-play-btn .pfm-icon-pause {
	font-size: 0.75em;
}

.pfm-episode.pfm-playing .pfm-play-btn {
	background: #222;
	color: #fff;
	border-color: #222;
}

.pfm-episode.pfm-playing .pfm-episode-title {
	color: #222;
}

.pfm-download {
	font-size: 0.85em;
}

.pfm-duration {
	font-size: 0.8em;
	color: #888;
}

.pfm-empty,
.pfm-error {
	padding: 1em 0;
	color: #656565;
}

.pfm-pagination {
	display: flex;
	gap: 0.5em;
	flex-wrap: wrap;
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid #ddd;
}

.pfm-pagination .pfm-page-current {
	font-weight: 700;
}

.pfm-pagination .pfm-page-link {
	text-decoration: none;
}

/* Alternate monthly calendar and view navigation. */
.pfm-archive-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.pfm-archive-toolbar .pfm-month-nav {
	flex: 1 1 300px;
	gap: 0.5rem;
	margin-bottom: 0;
}

.pfm-archive .pfm-view-toggle {
	display: flex;
	justify-content: flex-end;
	gap: 0.25rem;
	margin: 0;
}

.pfm-archive .pfm-view-link {
	padding: 0.5rem 0.85rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	color: #333;
	text-decoration: none;
}

.pfm-archive .pfm-view-link[aria-current] {
	background: var(--pfm-accent-tint);
	color: var(--pfm-accent);
	border-color: var(--pfm-accent);
	font-weight: 600;
}

.pfm-archive .pfm-calendar {
	width: 100%;
	table-layout: fixed;
	border-collapse: separate;
	border-spacing: 4px;
	margin: 0;
	border: 0;
}

.pfm-calendar caption {
	font-weight: 600;
	padding: 0.5rem;
}

.pfm-archive .pfm-calendar th,
.pfm-archive .pfm-calendar td {
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	vertical-align: middle;
}

.pfm-archive .pfm-calendar th {
	padding: 0.5rem 0;
	font-size: 0.85em;
}

.pfm-calendar abbr {
	text-decoration: none;
	border: 0;
}

.pfm-archive .pfm-calendar-day {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.15rem;
	min-height: 64px;
	padding: 0.4rem 0.1rem;
	border: 1px solid #eee;
	border-radius: 6px;
	background: #fafafa;
	color: #656565;
	text-decoration: none;
	line-height: 1.2;
}

.pfm-archive .pfm-has-recordings {
	border-color: var(--pfm-accent);
	background: var(--pfm-accent-tint);
	color: var(--pfm-accent);
	font-weight: 600;
}

.pfm-archive .pfm-has-recordings:hover {
	text-decoration: underline;
}

.pfm-archive .pfm-calendar-day[aria-current="date"] {
	outline: 2px solid var(--pfm-accent);
	outline-offset: -4px;
	font-weight: 700;
}

.pfm-archive .pfm-calendar-count {
	font-size: 0.7em;
	padding: 0.1rem 0.4rem;
	border-radius: 1rem;
	background: var(--pfm-accent);
	color: #fff;
}

.pfm-archive .pfm-view-link:focus-visible,
.pfm-archive .pfm-calendar-day:focus-visible {
	outline: 3px solid #222;
	outline-offset: 2px;
}

.pfm-calendar-legend {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85em;
	color: #555;
	margin: 0.75rem 0 1.25rem;
}

.pfm-calendar-legend span {
	flex: 0 0 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--pfm-accent);
}

/* Leave room for the sticky player when following a recording date link. */
.pfm-day-heading {
	scroll-margin-top: 8rem;
}

@media (max-width: 480px) {
	.pfm-archive .pfm-calendar {
		border-spacing: 2px;
	}
	.pfm-archive .pfm-calendar-day {
		min-height: 52px;
	}
	.pfm-archive .pfm-view-link {
		min-height: 44px;
		box-sizing: border-box;
	}
}
