/**
 * NBJ Music — frontend styles.
 *
 * Everything is scoped under .nbjm-app. Customize from a child theme by
 * overriding the custom properties, e.g.:
 *
 *   .nbjm-app { --nbj-accent: #f26a2e; --nbj-radius: 12px; }
 *
 * Component selectors are written as `.nbjm-app .nbjm-…` on purpose: theme
 * rules such as `.entry-content button` must not restyle the player.
 *
 * Layout breakpoints are container queries on the app's own width, so the
 * player adapts to narrow content columns as well as small screens.
 * The 760px drawer breakpoint is mirrored in nbj-music-app.js.
 */

/* ------------------------------------------------------------------ */
/* Tokens                                                             */
/* ------------------------------------------------------------------ */

/* Brand tokens live on the root so the theme can share them around the app. */
:where(:root) {
	--nbj-primary: #173b70;
	--nbj-blue: #2e7bcb;
	--nbj-accent: #ff5a26;
	--nbj-background: #fff9f1;
	--nbj-surface: #fff;
	--nbj-soft: #edf6fd;
	--nbj-radius: 16px;
}

/* Derived tokens stay on the app, so overriding a brand token on .nbjm-app still flows through. */
:where(.nbjm-app) {
	--nbjm-text: var(--nbj-primary);
	--nbjm-muted: #56657d;
	--nbjm-border: color-mix(in srgb, var(--nbj-primary) 11%, transparent);
	--nbjm-hover: color-mix(in srgb, var(--nbj-accent) 6%, var(--nbj-surface));
	--nbjm-accent-strong: color-mix(in srgb, var(--nbj-accent) 78%, #000); /* ≥4.5:1 with white text */
	--nbjm-accent-soft: color-mix(in srgb, var(--nbj-accent) 12%, var(--nbj-surface));
	--nbjm-shade: 23, 59, 112; /* Navy, for shadows and overlays (black in dark mode). */
	--nbjm-shadow: 0 12px 32px rgba(var(--nbjm-shade), 0.08), 0 2px 6px rgba(var(--nbjm-shade), 0.05);
	--nbjm-inverse-bg: var(--nbj-primary); /* Dark boxes with white text (the toast). */
	--nbjm-accent-text: var(--nbjm-accent-strong); /* Accent-colored text (lighter in dark mode). */
	--nbjm-radius-sm: calc(var(--nbj-radius) * 0.6);
	--nbjm-font-heading: var(--font-display, Georgia, "Times New Roman", serif);
	--nbjm-player-height: 88px;
	--nbjm-tabbar-height: 0px; /* The phone tab bar (below 760px). */
	--nbjm-actions-width: 120px;
	--nbjm-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reserve room for the fixed player so it never covers page content. */
body.nbjm-has-player {
	padding-bottom: calc(var(--nbjm-player-height, 88px) + var(--nbjm-tabbar-height, 0px) + env(safe-area-inset-bottom, 0px));
}

/* Phones: a floating player card above a bottom tab bar. */
@media (max-width: 759px) {
	body.nbjm-has-player,
	:where(.nbjm-app) {
		--nbjm-player-height: 64px; /* The 56px card and the gap above the tab bar. */
		--nbjm-tabbar-height: 58px;
	}
}

html.nbjm-dialog-open {
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Base & resets (scoped)                                             */
/* ------------------------------------------------------------------ */

.nbjm-app {
	color: var(--nbjm-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.45;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.nbjm-app *,
.nbjm-app *::before,
.nbjm-app *::after {
	box-sizing: border-box;
}

.nbjm-app [hidden] {
	display: none !important;
}

.nbjm-app button,
.nbjm-app input,
.nbjm-app select {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: normal;
	line-height: inherit;
	margin: 0;
	min-height: 0;
	padding: 0;
	text-transform: none;
	text-shadow: none;
	width: auto;
}

.nbjm-app button {
	cursor: pointer;
}

.nbjm-app button:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

.nbjm-app ol,
.nbjm-app ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbjm-app li {
	margin: 0;
}

.nbjm-app h2,
.nbjm-app h3,
.nbjm-app p {
	margin: 0;
	padding: 0;
}

.nbjm-app img {
	display: block;
	max-width: 100%;
}

.nbjm-app a {
	color: var(--nbj-blue);
}

.nbjm-app :focus-visible {
	outline: 3px solid var(--nbj-blue);
	outline-offset: 2px;
	border-radius: 6px;
}

/* Headings focused by script on view changes (for screen readers) aren't tab stops — no ring. */
:is(h1, h2, h3, main)[tabindex="-1"]:focus {
	outline: none;
}

.nbjm-app .nbjm-sr-only {
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.nbjm-app .nbjm-icon {
	display: inline-block;
	flex: none;
	height: 1.25em;
	vertical-align: middle;
	width: 1.25em;
}

.nbjm-sprite {
	height: 0;
	overflow: hidden;
	position: absolute;
	width: 0;
}

.nbjm-app .nbjm-noscript {
	background: var(--nbj-soft);
	border-radius: var(--nbj-radius);
	padding: 1rem 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Buttons & chips                                                    */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-btn {
	align-items: center;
	border: 1.5px solid transparent;
	border-radius: 999px;
	display: inline-flex;
	font-size: 1rem;
	font-weight: 700;
	gap: 0.5em;
	justify-content: center;
	line-height: 1.2;
	min-height: 48px;
	padding: 0.7em 1.6em;
	text-decoration: none;
	transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.nbjm-app .nbjm-btn:active:not(:disabled) {
	transform: translateY(1px);
}

.nbjm-app .nbjm-btn--primary {
	background: var(--nbjm-accent-strong);
	box-shadow: 0 8px 18px color-mix(in srgb, var(--nbj-accent) 32%, transparent);
	color: #fff;
}

.nbjm-app .nbjm-btn--primary:hover:not(:disabled) {
	background: color-mix(in srgb, var(--nbj-accent) 68%, #000);
}

.nbjm-app .nbjm-btn--light {
	background: var(--nbj-surface);
	box-shadow: 0 6px 16px rgba(var(--nbjm-shade), 0.1);
	color: var(--nbj-primary);
}

.nbjm-app .nbjm-btn--light:hover:not(:disabled) {
	background: var(--nbj-background);
}

.nbjm-app .nbjm-btn--outline {
	background: var(--nbj-surface);
	border-color: color-mix(in srgb, var(--nbj-accent) 55%, transparent);
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-btn--outline:hover:not(:disabled) {
	background: var(--nbjm-accent-soft);
}

.nbjm-app .nbjm-btn--small {
	font-size: 0.9rem;
	min-height: 40px;
	padding: 0.5em 1.1em;
}

.nbjm-app .nbjm-btn--block {
	width: 100%;
}

.nbjm-app .nbjm-link-btn {
	color: var(--nbjm-muted);
	font-size: 0.875rem;
	min-height: 32px;
	padding: 0.25em 0.5em;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nbjm-app .nbjm-link-btn:hover:not(:disabled) {
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-icon-btn {
	align-items: center;
	border-radius: 50%;
	color: var(--nbjm-muted);
	display: inline-flex;
	flex: none;
	height: 40px;
	justify-content: center;
	transition: background-color 0.15s ease, color 0.15s ease;
	width: 40px;
}

.nbjm-app .nbjm-icon-btn:hover:not(:disabled) {
	background: var(--nbjm-accent-soft);
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-icon-btn--small {
	height: 32px;
	width: 32px;
}

/* Toggle icon pairs (heart/heart-filled, plus/check, volume/mute). */
.nbjm-app .nbjm-icon--on {
	display: none;
}

.nbjm-app [aria-pressed="true"] > .nbjm-icon--off {
	display: none;
}

.nbjm-app [aria-pressed="true"] > .nbjm-icon--on {
	display: inline-block;
}

.nbjm-app .nbjm-fav[aria-pressed="true"] {
	color: var(--nbj-accent);
}

/* Quiet in a list of many; solid on the row being pointed at, so the Play buttons lead. */
.nbjm-app .nbjm-add {
	background: transparent;
	border: 1.5px solid color-mix(in srgb, var(--nbj-accent) 45%, transparent);
	border-radius: 10px;
	color: var(--nbjm-accent-text);
	height: 36px;
	width: 36px;
}

.nbjm-app .nbjm-row:is(:hover, :focus-within) .nbjm-add:not([aria-pressed="true"]) {
	background: var(--nbj-accent);
	border-color: var(--nbj-accent);
	color: #fff;
}

.nbjm-app .nbjm-add:hover:not(:disabled):not([aria-pressed="true"]) {
	background: var(--nbjm-accent-strong);
	border-color: var(--nbjm-accent-strong);
	color: #fff;
}

.nbjm-app .nbjm-add[aria-pressed="true"] {
	background: var(--nbjm-accent-soft);
	border-color: transparent;
	color: var(--nbjm-accent-text);
}

/* A row or player button's label on hover or keyboard focus; the script places it (_initButtonTips). */
.nbjm-app .nbjm-tip {
	background: var(--nbjm-inverse-bg);
	border: 0;
	border-radius: 6px;
	box-shadow: 0 6px 16px rgba(var(--nbjm-shade), 0.25);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	inset: auto; /* Undo the popover defaults. */
	line-height: 1.3;
	margin: 0;
	max-width: min(280px, calc(100vw - 16px));
	overflow: visible;
	padding: 0.4em 0.7em;
	pointer-events: none;
	position: fixed;
}

.nbjm-app .nbjm-chip {
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 10px;
	color: var(--nbj-primary);
	font-size: 0.875rem;
	font-weight: 600;
	min-height: 40px;
	padding: 0.45em 1em;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
}

.nbjm-app .nbjm-chip:hover {
	border-color: color-mix(in srgb, var(--nbj-accent) 45%, transparent);
}

.nbjm-app .nbjm-chip[aria-pressed="true"] {
	background: var(--nbjm-accent-strong);
	border-color: var(--nbjm-accent-strong);
	color: #fff;
}

.nbjm-app .nbjm-chip--removable {
	align-items: center;
	display: inline-flex;
	gap: 0.35em;
	min-height: 32px;
	padding: 0.25em 0.75em;
}

.nbjm-app .nbjm-count {
	background: var(--nbjm-accent-soft);
	border-radius: 999px;
	color: var(--nbjm-accent-text);
	display: inline-block;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	min-width: 1.6em;
	padding: 0.3em 0.55em;
	text-align: center;
}

/* Style / mood pills. */
.nbjm-app .nbjm-pill {
	background: var(--nbj-soft);
	border-radius: 999px;
	color: #1f5fa8;
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	min-height: 26px;
	padding: 0.25em 0.75em;
	white-space: nowrap;
}

.nbjm-app .nbjm-pill:hover {
	filter: brightness(0.96);
	text-decoration: underline;
}

.nbjm-app .nbjm-pill--worship { background: #ffe9e0; color: #a53a12; }
.nbjm-app .nbjm-pill--encouraging { background: #e3f0fc; color: #1d5a9e; }
.nbjm-app .nbjm-pill--upbeat { background: #fde6ec; color: #a8264a; }
.nbjm-app .nbjm-pill--calm { background: #e2f4ea; color: #1d6e45; }
.nbjm-app .nbjm-pill--smooth-jazz { background: #efe8fb; color: #5636a3; }
.nbjm-app .nbjm-pill--acoustic { background: #f8eedb; color: #7a4f00; }
.nbjm-app .nbjm-pill--bossa-nova { background: #ddf3f1; color: #0f6560; }
.nbjm-app .nbjm-pill--c0 { background: #e3f0fc; color: #1d5a9e; }
.nbjm-app .nbjm-pill--c1 { background: #ffe9e0; color: #a53a12; }
.nbjm-app .nbjm-pill--c2 { background: #e2f4ea; color: #1d6e45; }
.nbjm-app .nbjm-pill--c3 { background: #efe8fb; color: #5636a3; }
.nbjm-app .nbjm-pill--c4 { background: #f8eedb; color: #7a4f00; }
.nbjm-app .nbjm-pill--c5 { background: #ddf3f1; color: #0f6560; }

.nbjm-app .nbjm-live-badge {
	align-items: center;
	background: #e0362b;
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: 0.7rem;
	font-weight: 800;
	gap: 0.4em;
	letter-spacing: 0.06em;
	line-height: 1;
	padding: 0.4em 0.7em;
	text-transform: uppercase;
}

.nbjm-app .nbjm-live-dot {
	animation: nbjm-pulse 1.6s ease-in-out infinite;
	background: #fff;
	border-radius: 50%;
	display: inline-block;
	height: 6px;
	width: 6px;
}

/* ------------------------------------------------------------------ */
/* Shell layout                                                       */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-shell {
	container: nbjm-shell / inline-size;
}

/* The grid is an inner element: a container query can't restyle its own container. */
.nbjm-app .nbjm-layout {
	display: grid;
	gap: 24px;
	grid-template-areas:
		"nav"
		"main";
	grid-template-columns: minmax(0, 1fr);
}

.nbjm-app .nbjm-sidebar {
	grid-area: nav;
	min-width: 0;
}

.nbjm-app .nbjm-main {
	container: nbjm-main / inline-size;
	display: flex;
	flex-direction: column;
	gap: 20px;
	grid-area: main;
	min-width: 0;
}

.nbjm-app .nbjm-panel {
	display: none;
	grid-area: panel;
	min-width: 0;
}

/* Navigation (horizontal by default, vertical in the wide layout). */
.nbjm-app .nbjm-nav__list {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 2px 2px 6px;
	scrollbar-width: none;
}

.nbjm-app .nbjm-nav__list::-webkit-scrollbar {
	display: none;
}

.nbjm-app .nbjm-nav__item {
	align-items: center;
	text-decoration: none;
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 999px;
	color: var(--nbj-primary);
	display: flex;
	font-weight: 600;
	gap: 0.6em;
	min-height: 44px;
	padding: 0.5em 1em;
	position: relative;
	white-space: nowrap;
	width: 100%;
}

.nbjm-app .nbjm-nav__item:hover {
	background: var(--nbjm-hover);
}

.nbjm-app .nbjm-nav__item[aria-current] {
	background: var(--nbjm-accent-soft);
	border-color: transparent;
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-nav__item .nbjm-count {
	margin-left: auto;
}

.nbjm-app .nbjm-sidebar .nbjm-radio {
	display: none;
}

/* Medium: main + playlist column, navigation on top. */
@container nbjm-shell (min-width: 760px) {
	.nbjm-app .nbjm-layout {
		grid-template-areas:
			"nav nav"
			"main panel";
		grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
	}

	.nbjm-app .nbjm-panel {
		display: block;
	}
}

/* Wide: sidebar | main | playlist (the mockup layout). */
@container nbjm-shell (min-width: 1080px) {
	.nbjm-app .nbjm-layout {
		grid-template-areas: "nav main panel";
		grid-template-columns: 210px minmax(0, 1fr) 290px;
	}

	.nbjm-app .nbjm-sidebar {
		align-self: start;
		display: flex;
		flex-direction: column;
		gap: 28px;
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 24px);
	}

	.nbjm-app .nbjm-nav__list {
		flex-direction: column;
		gap: 4px;
		overflow: visible;
		padding: 0;
	}

	.nbjm-app .nbjm-nav__item {
		background: transparent;
		border: 0;
		border-radius: 12px;
		min-height: 48px;
		padding: 0.7em 1em;
	}

	.nbjm-app .nbjm-nav__item[aria-current]::before {
		background: var(--nbj-accent);
		border-radius: 3px;
		bottom: 10px;
		content: "";
		left: -8px;
		position: absolute;
		top: 10px;
		width: 3px;
	}

	.nbjm-app .nbjm-sidebar .nbjm-radio {
		display: block;
	}
}

/* The My Playlists view uses the full width: the side panel would repeat it. */
@container nbjm-shell (min-width: 760px) {
	.nbjm-app[data-view="playlist"] .nbjm-layout {
		grid-template-areas:
			"nav"
			"main";
		grid-template-columns: minmax(0, 1fr);
	}

	.nbjm-app[data-view="playlist"] .nbjm-panel {
		display: none;
	}
}

@container nbjm-shell (min-width: 1080px) {
	.nbjm-app[data-view="playlist"] .nbjm-layout {
		grid-template-areas: "nav main";
		grid-template-columns: 210px minmax(0, 1fr);
	}
}

/* ------------------------------------------------------------------ */
/* Search                                                             */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-topbar {
	align-items: center;
	display: flex;
	gap: 6px;
	justify-content: flex-end;
}

/* Settings and Install app for phones, where the tab bar replaces the menu. */
.nbjm-app .nbjm-topbar__btn {
	display: none;
}

.nbjm-app .nbjm-search {
	max-width: 420px;
	position: relative;
	width: 100%;
}

/* "Cancel" leaves the Search view (like Spotify); it takes the buttons' place. */
.nbjm-app .nbjm-topbar__cancel {
	align-items: center;
	border-radius: 999px;
	color: var(--nbj-primary);
	display: none;
	flex: none;
	font-size: 0.9375rem;
	font-weight: 600;
	min-height: 44px;
	padding: 0 10px;
}

.nbjm-app .nbjm-topbar__cancel:hover {
	color: var(--nbjm-accent-text);
}

.nbjm-app[data-view="search"] .nbjm-topbar__cancel {
	display: inline-flex;
}

.nbjm-app[data-view="search"] .nbjm-topbar__btn {
	display: none;
}

@media (max-width: 759px) {
	.nbjm-app .nbjm-layout {
		grid-template-areas: "main";
	}

	.nbjm-app .nbjm-sidebar {
		display: none;
	}

	.nbjm-app .nbjm-search {
		max-width: none;
	}

	/*
	 * Sticky search that slides away while scrolling down (see
	 * _initSearchReveal). Themes with a sticky header set --nbjm-sticky-top
	 * to its height.
	 */
	.nbjm-app .nbjm-topbar {
		margin: -8px 0;
		padding: 8px 0;
		position: sticky;
		top: var(--nbjm-sticky-top, 0px);
		transition: transform 0.25s ease;
		z-index: 20;
	}

	/*
	 * Only once stuck: in place, the bar sits on the page like before. The
	 * outset border image paints the background and a bottom line edge to
	 * edge without widening the page (it never adds scroll width).
	 */
	.nbjm-app .nbjm-topbar.is-stuck {
		border-image: linear-gradient(to bottom, var(--nbj-background) calc(100% - 1px), color-mix(in srgb, var(--nbj-primary) 11%, var(--nbj-background)) 0) 0 fill / 0 / 0 100vmax;
	}

	.nbjm-app .nbjm-topbar.is-hidden {
		transform: translateY(calc(-100% - var(--nbjm-sticky-top, 0px)));
	}

	.nbjm-app .nbjm-topbar__btn {
		color: var(--nbj-primary);
		display: inline-flex;
		height: 44px;
		width: 44px;
	}
}

.nbjm-app .nbjm-search__icon {
	color: var(--nbjm-muted);
	left: 16px;
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	/* Above the input, which glass turns into its own layer when stuck. */
	z-index: 1;
}

.nbjm-app .nbjm-search__input {
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(var(--nbjm-shade), 0.04);
	color: var(--nbj-primary);
	font-size: 0.95rem;
	min-height: 46px;
	padding: 0.6em 1.2em 0.6em 2.9em;
	width: 100%;
}

/* Room for the clear button, which only shows while there is text. */
.nbjm-app .nbjm-search__input:not(:placeholder-shown) {
	padding-right: 2.9em;
}

/* Our own clear button replaces the browser's (iOS Safari has none). */
.nbjm-app .nbjm-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.nbjm-app .nbjm-search__clear {
	position: absolute;
	right: 7px;
	top: 50%;
	transform: translateY(-50%);
}

/* Only while there is text: an empty box shows its placeholder. */
.nbjm-app .nbjm-search__input:placeholder-shown ~ .nbjm-search__clear {
	display: none;
}

.nbjm-app .nbjm-search__input::placeholder {
	color: var(--nbjm-muted);
	opacity: 1;
}

.nbjm-app .nbjm-search__input:focus-visible {
	border-color: var(--nbj-blue);
	outline-offset: 0;
	border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/* Hero                                                               */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-hero {
	background:
		radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--nbj-blue) 26%, transparent) 0%, transparent 55%),
		radial-gradient(90% 120% at 85% 100%, color-mix(in srgb, var(--nbj-accent) 22%, transparent) 0%, transparent 60%),
		radial-gradient(70% 90% at 0% 0%, var(--nbj-surface) 0%, transparent 70%),
		var(--nbj-background);
	border-radius: calc(var(--nbj-radius) * 1.25);
	box-shadow: var(--nbjm-shadow);
	isolation: isolate;
	overflow: hidden;
	padding: clamp(24px, 5cqi, 48px);
	position: relative;
}

.nbjm-app .nbjm-hero__image {
	height: 100%;
	inset: 0;
	object-fit: cover;
	object-position: right center;
	position: absolute;
	width: 100%;
	z-index: -2;
}

.nbjm-app .nbjm-hero--image::before {
	background: linear-gradient(100deg, var(--nbj-background) 0%, color-mix(in srgb, var(--nbj-background) 88%, transparent) 38%, color-mix(in srgb, var(--nbj-background) 20%, transparent) 70%, transparent 100%);
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.nbjm-app .nbjm-hero__content {
	max-width: 560px;
}

.nbjm-app .nbjm-hero__title {
	color: var(--nbj-primary);
	font-family: var(--nbjm-font-heading);
	font-size: clamp(2rem, 7cqi, 3.3rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.05;
	margin: 0 0 0.35em;
}

.nbjm-app .nbjm-hero__heading {
	display: block;
}

.nbjm-app .nbjm-hero__highlight {
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-hero__sub {
	display: block;
	font-size: 0.5em;
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.25;
	margin-top: 0.35em;
}

/* "Good evening," (accent) over the visitor's name, in the heading's place. */
.nbjm-app .nbjm-hero__greeting > span {
	display: block;
}

.nbjm-app .nbjm-hero__greeting[hidden],
.nbjm-app .nbjm-hero.has-greeting .nbjm-hero__title:not(.nbjm-hero__greeting),
.nbjm-app .nbjm-hero.has-greeting .nbjm-hero__text {
	display: none;
}

.nbjm-app .nbjm-hero__greeting {
	margin-bottom: 0.6em;
	overflow-wrap: anywhere;
}

.nbjm-app .nbjm-hero__text {
	color: color-mix(in srgb, var(--nbj-primary) 85%, #000);
	font-size: 1.05rem;
	margin-bottom: 1.4em;
	max-width: 46ch;
}

.nbjm-app .nbjm-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ------------------------------------------------------------------ */
/* Toolbar                                                            */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-toolbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
}

.nbjm-app .nbjm-filters {
	display: flex;
	flex: 1 1 auto;
	gap: 8px;
	min-width: 0;
	overflow-x: auto;
	padding: 2px;
	scrollbar-width: none;
}

.nbjm-app .nbjm-filters::-webkit-scrollbar {
	display: none;
}

/* "View as" and "Sort by" share one row, even on phones. */
.nbjm-app .nbjm-toolbar__controls {
	align-items: center;
	display: flex;
	gap: 8px;
	min-width: 0;
}

/* "View as": List or Covers, two icon buttons in one box like "Sort by". */
.nbjm-app .nbjm-view-as {
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 10px;
	display: flex;
	flex: none;
	gap: 2px;
	padding: 3px;
}

/* For the album list only. */
.nbjm-app:not([data-library-mode="albums"]) .nbjm-view-as {
	display: none;
}

.nbjm-app .nbjm-view-as__btn {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 7px;
	color: var(--nbjm-muted);
	cursor: pointer;
	display: inline-flex;
	font-size: 1.15rem;
	height: 32px;
	justify-content: center;
	padding: 0;
	transition: background-color 0.15s ease, color 0.15s ease;
	width: 36px;
}

.nbjm-app .nbjm-view-as__btn:hover {
	color: var(--nbj-primary);
}

.nbjm-app .nbjm-view-as__btn[aria-pressed="true"] {
	background: color-mix(in srgb, var(--nbj-accent) 14%, transparent);
	color: var(--nbj-accent);
}

.nbjm-app .nbjm-view-as__btn:focus-visible {
	outline: 2px solid var(--nbj-accent);
	outline-offset: 1px;
}

.nbjm-app .nbjm-sort {
	align-items: center;
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 10px;
	display: flex;
	flex: none;
	font-size: 0.875rem;
	gap: 0.4em;
	padding: 0 0.4em 0 0.9em;
}

.nbjm-app .nbjm-sort label {
	color: var(--nbjm-muted);
	margin: 0;
}

.nbjm-app .nbjm-sort select {
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%;
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	color: var(--nbj-primary);
	cursor: pointer;
	font-weight: 700;
	min-height: 38px;
	padding: 0 1.8em 0 0.2em;
}

.nbjm-app .nbjm-active-filter {
	align-items: center;
	color: var(--nbjm-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.875rem;
	gap: 8px;
	margin-top: -8px;
}

/* ------------------------------------------------------------------ */
/* Track list                                                         */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-tracks {
	background: var(--nbj-surface);
	border-radius: var(--nbj-radius);
	box-shadow: var(--nbjm-shadow);
	overflow: hidden;
}

.nbjm-app .nbjm-tracks__head,
.nbjm-app .nbjm-row {
	align-items: center;
	column-gap: 12px;
	display: grid;
	grid-template-columns: 28px 48px minmax(0, 1fr) var(--nbjm-actions-width);
	padding: 10px 16px;
}

.nbjm-app .nbjm-tracks__head {
	background: color-mix(in srgb, var(--nbj-background) 70%, var(--nbj-surface));
	border-bottom: 1px solid var(--nbjm-border);
	color: var(--nbjm-muted);
	display: none;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.nbjm-app .nbjm-tracks__head span:nth-child(2) {
	grid-column: 2 / 4;
}

.nbjm-app .nbjm-row {
	border-bottom: 1px solid var(--nbjm-border);
	position: relative;
	transition: background-color 0.15s ease;
}

.nbjm-app .nbjm-row:last-child {
	border-bottom: 0;
}

.nbjm-app .nbjm-row:hover {
	background: var(--nbjm-hover);
}

.nbjm-app .nbjm-row.is-current {
	background: color-mix(in srgb, var(--nbj-accent) 8%, var(--nbj-surface));
}

/* A shared song's row, scrolled into view when its link opens. */
.nbjm-app .nbjm-row.is-highlighted {
	animation: nbjm-highlight 3s ease-out;
}

.nbjm-app .nbjm-row__index {
	color: var(--nbjm-muted);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.nbjm-app .nbjm-row .nbjm-eq {
	display: none;
}

.nbjm-app .nbjm-row.is-current .nbjm-row__number {
	display: none;
}

.nbjm-app .nbjm-row.is-current .nbjm-eq {
	display: inline-flex;
}

.nbjm-app .nbjm-row__art {
	background: linear-gradient(135deg, var(--nbj-soft), color-mix(in srgb, var(--nbj-accent) 22%, var(--nbj-background)));
	border-radius: 10px;
	cursor: pointer;
	height: 48px;
	overflow: hidden;
	position: relative;
	width: 48px;
}

.nbjm-app .nbjm-row__art img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nbjm-app .nbjm-row__art-play {
	align-items: center;
	background: rgba(var(--nbjm-shade), 0.45);
	color: #fff;
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	position: absolute;
	transition: opacity 0.15s ease;
}

.nbjm-app .nbjm-row:hover .nbjm-row__art-play,
.nbjm-app .nbjm-row:focus-within .nbjm-row__art-play {
	opacity: 1;
}

.nbjm-app .nbjm-icon--pause,
.nbjm-app .is-playing > .nbjm-row__art .nbjm-icon--play {
	display: none;
}

.nbjm-app .is-playing > .nbjm-row__art .nbjm-icon--pause {
	display: inline-block;
}

.nbjm-app .nbjm-row__main {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nbjm-app .nbjm-row__title {
	align-items: center;
	color: var(--nbj-primary);
	display: flex;
	font-weight: 700;
	gap: 0.35em;
	max-width: 100%;
	min-height: 24px;
	text-align: left;
}

.nbjm-app .nbjm-row__title > span:first-child {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	display: -webkit-box;
	line-height: 1.3;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.nbjm-app .nbjm-row__title:hover > span:first-child {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nbjm-app .nbjm-row.is-current .nbjm-row__title {
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-row__featured {
	color: #d99a00;
	display: inline-flex;
	font-size: 0.8rem;
}

.nbjm-app .nbjm-row__album,
.nbjm-app .nbjm-row__duration {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
}

.nbjm-app .nbjm-row__sub {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-row__inline-album:not(:empty)::before {
	content: " · ";
}

.nbjm-app .nbjm-row__album {
	display: none;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.nbjm-app .nbjm-row__album > span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-row__type {
	font-size: 0.78rem;
	opacity: 0.85;
}

.nbjm-app .nbjm-row__styles {
	display: none;
	flex-wrap: wrap;
	gap: 4px;
}

.nbjm-app .nbjm-row__duration {
	display: none;
	font-variant-numeric: tabular-nums;
}

.nbjm-app .nbjm-row__actions {
	align-items: center;
	display: flex;
	gap: 2px;
}

/* Narrow list (phones): artwork, title, favorite and the ⋯ menu, which
   also holds "Add to My Playlist". The current song shows play/pause on its art. */
@container nbjm-main (max-width: 519px) {
	.nbjm-app .nbjm-tracks {
		--nbjm-actions-width: 82px;
	}

	.nbjm-app .nbjm-row {
		column-gap: 10px;
		grid-template-columns: 44px minmax(0, 1fr) var(--nbjm-actions-width);
		padding: 10px 12px;
	}

	.nbjm-app .nbjm-row__index,
	.nbjm-app .nbjm-row .nbjm-add {
		display: none;
	}

	.nbjm-app .nbjm-row__art {
		height: 44px;
		width: 44px;
	}

	.nbjm-app .nbjm-row.is-current .nbjm-row__art-play {
		opacity: 1;
	}

	.nbjm-app .nbjm-hero__actions .nbjm-btn {
		flex: 1 1 auto;
		padding-inline: 1.1em;
	}

	/* A shorter hero, so the first songs show without scrolling. */
	.nbjm-app .nbjm-hero {
		padding: 20px;
	}

	.nbjm-app .nbjm-hero__title {
		font-size: 1.75rem;
	}
}

/* Medium list: duration + style. */
@container nbjm-main (min-width: 520px) {
	.nbjm-app .nbjm-tracks__head,
	.nbjm-app .nbjm-row {
		grid-template-columns: 28px 48px minmax(0, 1fr) var(--nbjm-col-style, 108px) var(--nbjm-col-time, 48px) var(--nbjm-actions-width);
	}

	.nbjm-app .nbjm-tracks__head {
		display: grid;
	}

	.nbjm-app .nbjm-tracks__head span:nth-child(3) {
		display: none;
	}

	.nbjm-app .nbjm-row__styles {
		display: flex;
	}

	.nbjm-app .nbjm-row__duration {
		display: block;
	}
}

/* Full list: album / source column too. */
@container nbjm-main (min-width: 860px) {
	.nbjm-app .nbjm-tracks__head,
	.nbjm-app .nbjm-row {
		grid-template-columns: 28px 48px minmax(0, 1.5fr) var(--nbjm-col-album, minmax(0, 1fr)) var(--nbjm-col-style, 108px) var(--nbjm-col-time, 48px) var(--nbjm-actions-width);
	}

	.nbjm-app .nbjm-row__inline-album {
		display: none;
	}

	.nbjm-app .nbjm-tracks__head span:nth-child(3) {
		display: block;
	}

	.nbjm-app .nbjm-row__album {
		display: flex;
	}
}

/* Columns turned off in the settings. An empty --nbjm-col-* drops the track
   from the grid templates above (the space after the colon is required). */
.nbjm-app--hide-album {
	--nbjm-col-album: ;
}

.nbjm-app--hide-style {
	--nbjm-col-style: ;
}

.nbjm-app--hide-time {
	--nbjm-col-time: ;
}

.nbjm-app--hide-album .nbjm-row__album,
.nbjm-app--hide-album .nbjm-tracks__head-album,
.nbjm-app--hide-album .nbjm-tracks:not(.nbjm-recent) .nbjm-row__inline-album,
.nbjm-app--hide-style .nbjm-row__styles,
.nbjm-app--hide-style .nbjm-tracks__head-style,
.nbjm-app--hide-time .nbjm-row__duration,
.nbjm-app--hide-time .nbjm-tracks__head-time {
	display: none !important;
}

.nbjm-app .nbjm-tracks__footer {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px 18px;
}

.nbjm-app .nbjm-tracks__footer:has(.nbjm-tracks__status:empty):has([data-action="load-more"][hidden]) {
	display: none;
}

.nbjm-app .nbjm-tracks__status {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
	text-align: center;
}

.nbjm-app .nbjm-tracklist[aria-busy="true"] {
	opacity: 0.55;
	transition: opacity 0.2s ease 0.15s;
}

.nbjm-app .nbjm-empty {
	align-items: center;
	color: var(--nbjm-muted);
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 36px 20px;
	text-align: center;
}

.nbjm-app .nbjm-empty--small {
	font-size: 0.9rem;
	padding: 18px 8px;
}

/* ------------------------------------------------------------------ */
/* Albums tab                                                         */
/* ------------------------------------------------------------------ */

.nbjm-app[data-library-mode="albums"] [data-nbjm-view="music"] > .nbjm-tracks,
.nbjm-app[data-library-mode="albums"] [data-nbjm-view="music"] > .nbjm-active-filter {
	display: none;
}

.nbjm-app .nbjm-albums {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.nbjm-app .nbjm-albums[hidden] {
	display: none;
}

.nbjm-app .nbjm-albums[aria-busy="true"] {
	opacity: 0.55;
}

/* The album grid: covers that open each album's page. */
.nbjm-app .nbjm-album-grid {
	display: grid;
	gap: 24px 20px;
	grid-template-columns: repeat(auto-fill, minmax(min(170px, 42cqi), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbjm-app .nbjm-album-card {
	min-width: 0;
}

.nbjm-app .nbjm-album-card__link {
	border-radius: 14px;
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-decoration: none;
}

.nbjm-app .nbjm-album-card__link:focus-visible {
	outline: 2px solid var(--nbj-accent);
	outline-offset: 4px;
}

.nbjm-app .nbjm-album-card__art {
	aspect-ratio: 1;
	background: linear-gradient(135deg, var(--nbj-soft), color-mix(in srgb, var(--nbj-accent) 22%, var(--nbj-background)));
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(var(--nbjm-shade), 0.14), 0 8px 28px color-mix(in srgb, var(--nbjm-album-tint, transparent) 45%, transparent);
	display: block;
	margin-bottom: 8px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nbjm-app .nbjm-album-card__art img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nbjm-app .nbjm-album-card__eyebrow {
	color: var(--nbj-accent);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nbjm-app .nbjm-album-card__title {
	color: var(--nbj-primary);
	-webkit-box-orient: vertical;
	display: -webkit-box;
	font-size: 0.975rem;
	font-weight: 800;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	line-height: 1.25;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.nbjm-app .nbjm-album-card__meta {
	color: var(--nbjm-muted);
	font-size: 0.8125rem;
	font-weight: 600;
}

@media (hover: hover) {
	.nbjm-app .nbjm-album-card__link:hover .nbjm-album-card__art {
		box-shadow: 0 14px 28px rgba(var(--nbjm-shade), 0.2), 0 10px 36px color-mix(in srgb, var(--nbjm-album-tint, transparent) 60%, transparent);
		transform: translateY(-3px);
	}
}

/* An album's own page (?album=): just the album, without the hero or song filters. */
.nbjm-app[data-album-page] [data-nbjm-view="music"] > .nbjm-hero,
.nbjm-app[data-album-page] [data-nbjm-view="music"] > .nbjm-toolbar {
	display: none;
}

.nbjm-app .nbjm-albums--page {
	gap: 12px;
}

.nbjm-app .nbjm-albums__back {
	align-items: center;
	align-self: flex-start;
	border-radius: 999px;
	color: var(--nbj-primary);
	display: inline-flex;
	font-weight: 700;
	gap: 4px;
	padding: 6px 12px 6px 4px;
	text-decoration: none;
}

.nbjm-app .nbjm-albums__back .nbjm-icon {
	transform: rotate(90deg);
}

.nbjm-app .nbjm-albums__back:hover {
	background: var(--nbjm-border);
}

.nbjm-app .nbjm-albums__back:focus-visible {
	outline: 2px solid var(--nbj-accent);
	outline-offset: 2px;
}

/* The page's header is a hero: a larger cover over more of the scene. */
.nbjm-app .nbjm-album--page .nbjm-album__head {
	min-height: 300px;
	padding: 28px;
}

.nbjm-app .nbjm-album--page .nbjm-album__art {
	width: 200px;
}

.nbjm-app .nbjm-album--page .nbjm-album__title {
	font-size: clamp(1.6rem, 4.6cqi, 2.9rem);
}

.nbjm-app .nbjm-album--page .nbjm-album__title:focus {
	outline: none;
}

.nbjm-app .nbjm-album--page .nbjm-album__scene {
	-webkit-mask-image: linear-gradient(to left, #000 45%, transparent 95%);
	mask-image: linear-gradient(to left, #000 45%, transparent 95%);
	opacity: 0.8;
}

.nbjm-app .nbjm-album__head {
	align-items: flex-end;
	/* --nbjm-album-tint: the cover's color, from JS (Settings → Artwork glow).
	   A glow of it behind the cover, over a wash that fades across the header. */
	background:
		radial-gradient(42% 130% at 0% 30%, color-mix(in srgb, var(--nbjm-album-tint, var(--nbj-accent)) 45%, transparent), transparent 100%),
		linear-gradient(135deg, color-mix(in srgb, var(--nbjm-album-tint, var(--nbj-accent)) 26%, var(--nbj-surface)), var(--nbj-surface) 75%);
	border-bottom: 1px solid var(--nbjm-border);
	display: flex;
	gap: 20px;
	padding: 20px;
}

/* The album's scene, faded in from the right so the title stays on the surface color. */
.nbjm-app .nbjm-album__head.has-scene {
	isolation: isolate;
	overflow: hidden;
	position: relative;
}

.nbjm-app .nbjm-album__scene {
	height: 100%;
	inset: 0;
	-webkit-mask-image: linear-gradient(to left, #000 25%, transparent 80%);
	mask-image: linear-gradient(to left, #000 25%, transparent 80%);
	object-fit: cover;
	opacity: 0.55;
	pointer-events: none;
	position: absolute;
	width: 100%;
	z-index: -1;
}

.nbjm-app .nbjm-album__art {
	aspect-ratio: 1;
	background: linear-gradient(135deg, var(--nbj-soft), color-mix(in srgb, var(--nbj-accent) 22%, var(--nbj-background)));
	border-radius: 12px;
	box-shadow: 0 10px 24px rgba(var(--nbjm-shade), 0.18), 0 8px 36px color-mix(in srgb, var(--nbjm-album-tint, transparent) 55%, transparent);
	flex: none;
	overflow: hidden;
	width: 150px;
}

/* In the album list, the cover and title open the album's page. */
.nbjm-app a.nbjm-album__art {
	display: block;
	transition: transform 0.2s ease;
}

.nbjm-app .nbjm-album__title a {
	color: inherit;
	text-decoration: none;
}

.nbjm-app .nbjm-album__title a:focus-visible {
	border-radius: 4px;
	outline: 2px solid var(--nbj-accent);
	outline-offset: 2px;
}

@media (hover: hover) {
	.nbjm-app a.nbjm-album__art:hover {
		transform: scale(1.03);
	}

	.nbjm-app .nbjm-album__title a:hover {
		text-decoration: underline;
		text-decoration-thickness: 2px;
		text-underline-offset: 0.15em;
	}
}

.nbjm-app .nbjm-album__art img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nbjm-app .nbjm-album__info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.nbjm-app .nbjm-album__title {
	color: var(--nbj-primary);
	font-size: clamp(1.35rem, 3.2cqi, 2.1rem);
	font-weight: 800;
	line-height: 1.15;
	margin: 0;
	overflow-wrap: anywhere;
}

.nbjm-app .nbjm-album__meta {
	color: var(--nbjm-muted);
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0 0 6px;
}

.nbjm-app .nbjm-album__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Upcoming album: "Coming soon" above the title, a countdown below the meta line. */
.nbjm-app .nbjm-album__eyebrow {
	color: var(--nbjm-accent-text);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	margin: 0;
	text-transform: uppercase;
}

.nbjm-app .nbjm-countdown {
	align-self: flex-start;
	background: color-mix(in srgb, var(--nbjm-album-tint, var(--nbj-accent)) 10%, var(--nbj-background));
	border: 1px solid var(--nbjm-border);
	border-radius: 10px;
	display: flex;
	margin: 0 0 8px;
	padding: 8px 4px;
}

.nbjm-app .nbjm-countdown__unit {
	align-items: center;
	display: flex;
	flex-direction: column;
	min-width: 64px;
	padding: 0 8px;
}

.nbjm-app .nbjm-countdown__unit + .nbjm-countdown__unit {
	border-left: 1px solid var(--nbjm-border);
}

.nbjm-app .nbjm-countdown__value {
	color: var(--nbj-primary);
	font-size: 1.5rem;
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	line-height: 1.2;
}

.nbjm-app .nbjm-countdown__label {
	color: var(--nbjm-muted);
	font-size: 0.75rem;
	font-weight: 600;
}

/* "Get notified" (email signup), or "You're on the list" once subscribed. */
html.nbjm-subscribed .nbjm-app .nbjm-album__notify,
html:not(.nbjm-subscribed) .nbjm-app .nbjm-album__notified {
	display: none;
}

.nbjm-app .nbjm-album__notified {
	align-items: center;
	background: color-mix(in srgb, var(--nbjm-album-tint, var(--nbj-accent)) 10%, var(--nbj-background));
	border: 1px solid var(--nbjm-border);
	border-radius: 999px;
	color: var(--nbj-primary);
	display: inline-flex;
	font-size: 0.9rem;
	font-weight: 700;
	gap: 5px;
	min-height: 40px;
	padding: 0.5em 0.8em;
}

.nbjm-app .nbjm-album__notified .nbjm-icon {
	color: var(--nbjm-accent-text);
}

/* The bell rings once on hover, like the signup sheet's. */
.nbjm-app .nbjm-album__notify:hover .nbjm-icon {
	animation: nbjm-bell-ring 4s ease-in-out 1;
	transform-origin: 50% 10%;
}

@media (prefers-reduced-motion: reduce) {
	.nbjm-app .nbjm-album__notify:hover .nbjm-icon {
		animation: none;
	}
}

/* A song not out yet: dimmed, a lock instead of the row's buttons. */
.nbjm-app .nbjm-row--locked {
	cursor: default;
}

.nbjm-app .nbjm-row--locked .nbjm-row__index,
.nbjm-app .nbjm-row--locked .nbjm-row__main,
.nbjm-app .nbjm-row--locked .nbjm-row__duration {
	opacity: 0.55;
}

.nbjm-app .nbjm-album .nbjm-row--locked .nbjm-row__index {
	cursor: default;
}

.nbjm-app .nbjm-row--locked .nbjm-row__actions {
	color: var(--nbjm-muted);
	justify-content: flex-end;
}

.nbjm-app .nbjm-row__lock {
	height: 18px;
	margin-right: 10px;
	width: 18px;
}

/* The album is already in the header: drop it from each row. */
.nbjm-app .nbjm-album .nbjm-row__inline-album,
.nbjm-app .nbjm-album .nbjm-tracks__head .nbjm-tracks__head-album {
	display: none;
}

@container nbjm-main (max-width: 519px) {
	.nbjm-app .nbjm-album__head {
		gap: 14px;
		padding: 16px 12px;
	}

	.nbjm-app .nbjm-album__art {
		width: 96px;
	}

	/* Cover beside the title, buttons on their own full-width row below. */
	.nbjm-app .nbjm-album__head {
		align-items: end;
		display: grid;
		grid-template-columns: 96px minmax(0, 1fr);
		row-gap: 6px;
	}

	.nbjm-app .nbjm-album__info {
		display: contents;
	}

	.nbjm-app .nbjm-album__art {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.nbjm-app .nbjm-album__title,
	.nbjm-app .nbjm-album__meta {
		grid-column: 2;
	}

	.nbjm-app .nbjm-album__title {
		align-self: end;
	}

	.nbjm-app .nbjm-album__meta {
		align-self: start;
	}

	.nbjm-app .nbjm-album__actions {
		grid-column: 1 / -1;
		margin-top: 8px;
	}

	.nbjm-app .nbjm-album__eyebrow {
		align-self: end;
		grid-column: 2;
	}

	/* Upcoming: eyebrow, title and meta beside the cover; the countdown spans below. */
	.nbjm-app .nbjm-album--upcoming .nbjm-album__art {
		grid-row: 1 / span 3;
	}

	.nbjm-app .nbjm-album--upcoming .nbjm-album__title {
		align-self: center;
	}

	/* The album page: a bigger cover, the scene fading up from below. */
	.nbjm-app .nbjm-album--page .nbjm-album__head {
		grid-template-columns: 120px minmax(0, 1fr);
		min-height: 0;
		padding: 24px 12px 16px;
	}

	.nbjm-app .nbjm-album--page .nbjm-album__art {
		width: 120px;
	}

	.nbjm-app .nbjm-album--page .nbjm-album__scene {
		-webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
		mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
		opacity: 0.6;
	}

	.nbjm-app .nbjm-countdown {
		grid-column: 1 / -1;
		justify-content: space-between;
		margin: 8px 0 0;
	}

	.nbjm-app .nbjm-countdown__unit {
		flex: 1;
		min-width: 0;
	}
}

@container nbjm-main (min-width: 860px) {
	.nbjm-app .nbjm-album .nbjm-row__album {
		display: none;
	}
}

/* Album rows: no artwork (the cover is in the header). The number turns into
   play on hover, an equalizer while playing, and pause on hover while playing. */
.nbjm-app .nbjm-album .nbjm-tracks__head,
.nbjm-app .nbjm-album .nbjm-row {
	grid-template-columns: 28px minmax(0, 1fr) var(--nbjm-actions-width);
}

@container nbjm-main (min-width: 520px) {
	.nbjm-app .nbjm-album .nbjm-tracks__head,
	.nbjm-app .nbjm-album .nbjm-row {
		grid-template-columns: 28px minmax(0, 1fr) var(--nbjm-col-style, 108px) var(--nbjm-col-time, 48px) var(--nbjm-actions-width);
	}
}

.nbjm-app .nbjm-album .nbjm-tracks__head span:nth-child(2) {
	grid-column: auto;
}

.nbjm-app .nbjm-album .nbjm-row__art {
	display: none;
}

.nbjm-app .nbjm-album .nbjm-row__index {
	align-items: center;
	cursor: pointer;
	display: flex;
	height: 32px;
	justify-content: center;
}

.nbjm-app .nbjm-row__index-play {
	color: var(--nbj-primary);
	display: none;
}

/* Current song, paused: its number in the accent color. */
.nbjm-app .nbjm-album .nbjm-row.is-current:not(.is-playing) .nbjm-row__number {
	color: var(--nbjm-accent-text);
	display: inline;
}

.nbjm-app .nbjm-album .nbjm-row.is-current:not(.is-playing) .nbjm-eq {
	display: none;
}

@media (hover: hover) {
	.nbjm-app .nbjm-album .nbjm-row:hover .nbjm-row__index .nbjm-row__number,
	.nbjm-app .nbjm-album .nbjm-row:hover .nbjm-row__index .nbjm-eq {
		display: none;
	}

	.nbjm-app .nbjm-album .nbjm-row:hover .nbjm-row__index-play {
		display: inline-flex;
	}
}

.nbjm-app .nbjm-album .nbjm-row:has(:focus-visible) .nbjm-row__index .nbjm-row__number,
.nbjm-app .nbjm-album .nbjm-row:has(:focus-visible) .nbjm-row__index .nbjm-eq {
	display: none;
}

.nbjm-app .nbjm-album .nbjm-row:has(:focus-visible) .nbjm-row__index-play {
	display: inline-flex;
}

.nbjm-app .nbjm-row.is-playing .nbjm-row__index-play .nbjm-icon--play {
	display: none;
}

.nbjm-app .nbjm-row.is-playing .nbjm-row__index-play .nbjm-icon--pause {
	display: inline-block;
}

/* The album's own play button shows pause while the album plays. */
.nbjm-app .nbjm-album__actions .is-playing .nbjm-icon--play {
	display: none;
}

.nbjm-app .nbjm-album__actions .is-playing .nbjm-icon--pause {
	display: inline-block;
}

/* "Play" and "Pause" stacked in one cell: the button is as wide as the longer one. */
.nbjm-app .nbjm-album__labels {
	display: inline-grid;
	justify-items: center;
}

.nbjm-app .nbjm-album__labels > span {
	grid-area: 1 / 1;
}

.nbjm-app .nbjm-album__pause-label,
.nbjm-app .is-playing .nbjm-album__play-label {
	visibility: hidden;
}

.nbjm-app .is-playing .nbjm-album__pause-label {
	visibility: visible;
}

/* Equalizer animation for the playing song. */
.nbjm-app .nbjm-eq {
	align-items: flex-end;
	gap: 2px;
	height: 14px;
	justify-content: center;
}

.nbjm-app .nbjm-eq i {
	animation: nbjm-eq 0.9s ease-in-out infinite;
	animation-play-state: paused;
	background: var(--nbj-accent);
	border-radius: 1px;
	display: block;
	height: 100%;
	transform-origin: bottom;
	width: 3px;
}

.nbjm-app .nbjm-eq i:nth-child(2) {
	animation-delay: -0.3s;
}

.nbjm-app .nbjm-eq i:nth-child(3) {
	animation-delay: -0.6s;
}

.nbjm-app .is-playing .nbjm-eq i {
	animation-play-state: running;
}

/* ------------------------------------------------------------------ */
/* Views                                                              */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-view {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.nbjm-app .nbjm-view__header {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
}

.nbjm-app .nbjm-view__title {
	font-family: var(--nbjm-font-heading);
	font-size: clamp(1.6rem, 4cqi, 2.2rem);
	font-weight: 700;
}

.nbjm-app .nbjm-view__actions {
	display: flex;
	gap: 8px;
}

/* ------------------------------------------------------------------ */
/* Search view (browse tiles, recent searches, results)               */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-search-view [data-nbjm="search-browse"],
.nbjm-app .nbjm-search-view__results {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.nbjm-app .nbjm-search-view [hidden] {
	display: none;
}

.nbjm-app .nbjm-search-view__heading {
	font-family: var(--nbjm-font-heading);
	font-size: clamp(1.25rem, 3cqi, 1.6rem);
	font-weight: 700;
}

.nbjm-app .nbjm-search-view__recent {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 8px;
}

.nbjm-app .nbjm-search-view__recent-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbjm-app .nbjm-recent-search {
	align-items: center;
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 999px;
	display: inline-flex;
	max-width: 100%;
	min-width: 0;
}

.nbjm-app .nbjm-recent-search__text {
	align-items: center;
	color: var(--nbj-primary);
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 6px;
	min-height: 36px;
	min-width: 0;
	overflow: hidden;
	padding: 0 4px 0 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-recent-search__text .nbjm-icon {
	color: var(--nbjm-muted);
	flex: none;
	height: 14px;
	width: 14px;
}

.nbjm-app .nbjm-recent-search__remove {
	align-items: center;
	border-radius: 50%;
	color: var(--nbjm-muted);
	display: inline-flex;
	flex: none;
	height: 32px;
	justify-content: center;
	margin-right: 2px;
	width: 32px;
}

.nbjm-app .nbjm-recent-search__remove .nbjm-icon {
	height: 14px;
	width: 14px;
}

.nbjm-app .nbjm-recent-search:hover,
.nbjm-app .nbjm-recent-search:focus-within {
	border-color: color-mix(in srgb, var(--nbj-accent) 45%, transparent);
}

.nbjm-app .nbjm-recent-search__remove:hover {
	background: var(--nbjm-accent-soft);
	color: var(--nbjm-accent-text);
}

/* Tiles: like Spotify's "Browse all" genre cards. */
.nbjm-app .nbjm-tiles {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbjm-app .nbjm-tile {
	--nbjm-tile: var(--nbj-primary);
	aspect-ratio: 16 / 10;
	background: var(--nbjm-tile);
	border-radius: var(--nbjm-radius-sm);
	align-items: flex-start;
	color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	overflow: hidden;
	padding: 14px 16px;
	position: relative;
	text-align: left;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	width: 100%;
}

.nbjm-app .nbjm-tile:hover {
	box-shadow: var(--nbjm-shadow);
	transform: translateY(-2px);
}

.nbjm-app .nbjm-tile:active {
	transform: scale(0.98);
}

.nbjm-app .nbjm-tile:focus-visible {
	outline: 3px solid var(--nbj-accent);
	outline-offset: 3px;
}

.nbjm-app .nbjm-tile__label {
	display: block;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.2;
	max-width: 75%;
	overflow-wrap: anywhere;
	position: relative;
}

/* A large tilted icon peeking out of the corner, like Spotify's tilted cover. */
.nbjm-app .nbjm-tile__icon {
	bottom: -10%;
	height: 56%;
	opacity: 0.28;
	position: absolute;
	right: -4%;
	transform: rotate(22deg);
	width: auto;
	aspect-ratio: 1;
}

/* The pill text colors (all ≥4.5:1 with white). */
.nbjm-app .nbjm-tile--albums { --nbjm-tile: var(--nbjm-accent-strong); }
.nbjm-app .nbjm-tile--worship,
.nbjm-app .nbjm-tile--c1 { --nbjm-tile: #a53a12; }
.nbjm-app .nbjm-tile--encouraging,
.nbjm-app .nbjm-tile--c0 { --nbjm-tile: #1d5a9e; }
.nbjm-app .nbjm-tile--upbeat { --nbjm-tile: #a8264a; }
.nbjm-app .nbjm-tile--calm,
.nbjm-app .nbjm-tile--c2 { --nbjm-tile: #1d6e45; }
.nbjm-app .nbjm-tile--smooth-jazz,
.nbjm-app .nbjm-tile--c3 { --nbjm-tile: #5636a3; }
.nbjm-app .nbjm-tile--acoustic,
.nbjm-app .nbjm-tile--c4 { --nbjm-tile: #7a4f00; }
.nbjm-app .nbjm-tile--bossa-nova,
.nbjm-app .nbjm-tile--c5 { --nbjm-tile: #0f6560; }

@container nbjm-main (max-width: 519px) {
	.nbjm-app .nbjm-tiles {
		gap: 12px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nbjm-app .nbjm-tile {
		padding: 12px;
	}

	.nbjm-app .nbjm-tile__label {
		font-size: 0.95rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nbjm-app .nbjm-tile,
	.nbjm-app .nbjm-tile:hover,
	.nbjm-app .nbjm-tile:active {
		transform: none;
		transition: none;
	}
}

/* The part of a song title that matches the search. */
.nbjm-app mark.nbjm-match {
	background: none;
	color: var(--nbjm-accent-text);
	font-weight: 800;
}

.nbjm-app .nbjm-row.is-current mark.nbjm-match {
	color: inherit;
}

/* ------------------------------------------------------------------ */
/* Settings (backup & restore)                                        */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-settings__card {
	background: var(--nbj-surface);
	border-radius: var(--nbj-radius);
	box-shadow: var(--nbjm-shadow);
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 720px;
	padding: 20px;
}

.nbjm-app .nbjm-settings__title {
	font-family: var(--nbjm-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0;
}

.nbjm-app .nbjm-settings__text,
.nbjm-app .nbjm-settings__hint {
	color: var(--nbjm-muted);
	font-size: 0.9375rem;
	margin: 0;
}

.nbjm-app .nbjm-settings__hint {
	font-size: 0.875rem;
}

.nbjm-app .nbjm-settings__summary,
.nbjm-app .nbjm-settings__restore-summary {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	margin: 0;
}

.nbjm-app .nbjm-settings__status {
	align-items: center;
	color: var(--nbjm-muted);
	display: flex;
	font-size: 0.875rem;
	gap: 8px;
	margin: 0;
}

.nbjm-app .nbjm-settings__status:empty {
	display: none;
}

.nbjm-app .nbjm-settings__status::before {
	background: currentColor;
	border-radius: 50%;
	content: "";
	flex: none;
	height: 8px;
	width: 8px;
}

.nbjm-app .nbjm-settings__status[data-state="persisted"]::before {
	background: #2e8b57;
}

.nbjm-app .nbjm-settings__status[data-state="best-effort"]::before {
	background: #d9a400;
}

.nbjm-app .nbjm-settings__status[data-state="blocked"] {
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-settings__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.nbjm-app .nbjm-settings__restore {
	background: var(--nbjm-accent-soft);
	border: 1px solid var(--nbjm-border);
	border-radius: var(--nbjm-radius-sm);
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
}

.nbjm-app .nbjm-settings__restore[hidden],
.nbjm-app .nbjm-settings__notice[hidden],
.nbjm-app .nbjm-settings__group[hidden],
.nbjm-app .nbjm-settings__card[hidden] {
	display: none;
}

.nbjm-app .nbjm-settings__card + .nbjm-settings__card {
	margin-top: 16px;
}

.nbjm-app .nbjm-settings__group,
.nbjm-app .nbjm-settings__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nbjm-app .nbjm-settings__input {
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 8px;
	color: var(--nbjm-text);
	flex: 1 1 14em;
	font: inherit;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: 0.05em;
	min-height: 40px;
	min-width: 0;
	padding: 0 0.7em;
	text-transform: uppercase;
}

.nbjm-app .nbjm-settings__input::placeholder {
	color: var(--nbjm-muted);
	opacity: 0.6;
}

.nbjm-app .nbjm-settings__code-row {
	align-items: center;
	display: flex;
	gap: 4px;
}

.nbjm-app .nbjm-settings__code-row .nbjm-icon-btn.is-copied {
	color: #2e8b57;
}

.nbjm-app .nbjm-settings__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 0;
	overflow-wrap: anywhere;
	user-select: all;
}

.nbjm-app .nbjm-settings__restore-summary:focus {
	outline: none;
}

.nbjm-app .nbjm-settings__restore-summary:focus-visible {
	outline: 2px solid var(--nbj-accent);
	outline-offset: 2px;
}

.nbjm-app .nbjm-settings__notice {
	border-left: 3px solid var(--nbj-accent);
	font-size: 0.875rem;
	margin: 0;
	padding-left: 10px;
}

@container nbjm-main (max-width: 519px) {
	.nbjm-app .nbjm-settings__card {
		padding: 16px;
	}

	.nbjm-app .nbjm-settings__actions .nbjm-btn {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------------------------------ */
/* Live radio card                                                    */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-radio {
	background: linear-gradient(180deg, color-mix(in srgb, var(--nbj-accent) 8%, var(--nbj-surface)) 0%, var(--nbj-surface) 60%);
	border-radius: var(--nbj-radius);
	box-shadow: var(--nbjm-shadow);
	overflow: hidden;
	padding: 14px;
}

.nbjm-app .nbjm-radio__art {
	aspect-ratio: 4 / 3;
	background: linear-gradient(160deg, #ffd8b8 0%, #ff9d6c 35%, #6aa9de 75%, #2e7bcb 100%);
	border-radius: calc(var(--nbj-radius) * 0.75);
	overflow: hidden;
	position: relative;
}

.nbjm-app .nbjm-radio__art img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nbjm-app .nbjm-radio__art-fallback {
	align-items: center;
	color: rgba(255, 255, 255, 0.9);
	display: flex;
	font-size: 3rem;
	inset: 0;
	justify-content: center;
	position: absolute;
}

.nbjm-app .nbjm-radio__art .nbjm-live-badge {
	position: absolute;
	right: 10px;
	top: 10px;
}

.nbjm-app .nbjm-radio__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 4px 4px;
}

.nbjm-app .nbjm-radio__title {
	color: var(--nbj-primary);
	font-family: var(--nbjm-font-heading);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.2;
}

.nbjm-app .nbjm-radio__tagline {
	color: var(--nbj-primary);
	font-weight: 600;
}

.nbjm-app .nbjm-radio__desc,
.nbjm-app .nbjm-radio__notice {
	color: var(--nbjm-muted);
	font-size: 0.9rem;
}

.nbjm-app .nbjm-radio__now {
	color: var(--nbjm-accent-text);
	font-size: 0.875rem;
	font-weight: 600;
}

.nbjm-app .nbjm-radio .nbjm-btn {
	margin-top: 10px;
}

.nbjm-app [data-action="radio-toggle"] .nbjm-icon--pause {
	display: none;
}

.nbjm-app [data-action="radio-toggle"].is-playing .nbjm-icon--play {
	display: none;
}

.nbjm-app [data-action="radio-toggle"].is-playing .nbjm-icon--pause {
	display: inline-block;
}

.nbjm-app .nbjm-radio--full {
	display: grid;
	gap: 24px;
	padding: clamp(16px, 4cqi, 32px);
}

@container nbjm-main (min-width: 600px) {
	.nbjm-app .nbjm-radio--full {
		align-items: center;
		gap: 32px;
		grid-template-columns: minmax(160px, min(320px, 40%)) minmax(0, 1fr);
	}
}

/* Lets the scrolling "now playing" ticker clip instead of widening the card. */
.nbjm-app .nbjm-radio--full .nbjm-radio__body {
	min-width: 0;
}

.nbjm-app .nbjm-radio--full .nbjm-radio__art {
	aspect-ratio: 1;
}

.nbjm-app .nbjm-radio--full .nbjm-radio__title {
	font-size: clamp(1.8rem, 5cqi, 2.6rem);
}

.nbjm-app .nbjm-radio--full .nbjm-radio__tagline {
	font-size: 1.2rem;
}

.nbjm-app .nbjm-radio--full .nbjm-radio__desc {
	font-size: 1rem;
}

.nbjm-app .nbjm-radio--full .nbjm-radio__now {
	font-size: 1rem;
	margin-top: 8px;
}

.nbjm-app .nbjm-radio--full .nbjm-btn {
	align-self: flex-start;
	width: auto;
}

/* "Now playing" panel: what's on air, set apart from the station details. */
.nbjm-app .nbjm-radio__on-air {
	background: var(--nbjm-accent-soft);
	border-left: 3px solid var(--nbj-accent);
	border-radius: var(--nbjm-radius-sm);
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 14px;
	min-width: 0;
	padding: 12px 16px;
}

.nbjm-app .nbjm-radio__on-air[hidden] {
	display: none;
}

.nbjm-app .nbjm-radio__eyebrow {
	align-items: center;
	color: var(--nbjm-accent-text);
	display: flex;
	font-size: 0.75rem;
	font-weight: 700;
	gap: 8px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nbjm-app .nbjm-radio__eyebrow[hidden] {
	display: none;
}

/* Still while the radio is stopped; moves while it plays (.is-playing on the card). */
.nbjm-app .nbjm-radio__eyebrow .nbjm-eq {
	display: inline-flex;
	height: 12px;
}

.nbjm-app .nbjm-radio--full .nbjm-radio__on-air .nbjm-radio__now {
	color: var(--nbj-primary);
	font-family: var(--nbjm-font-heading);
	font-size: clamp(1.1rem, 3cqi, 1.35rem);
	font-weight: 700;
	line-height: 1.3;
	margin-top: 0;
}

.nbjm-app .nbjm-radio--full .nbjm-radio__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 14px;
}

.nbjm-app .nbjm-radio--full .nbjm-radio__actions .nbjm-btn {
	margin-top: 0;
}

.nbjm-app .nbjm-radio__track {
	align-items: center;
	display: flex;
	gap: 12px;
}

.nbjm-app .nbjm-radio__track[hidden] {
	display: none;
}

/* Recently played songs, below the full radio card. */
.nbjm-app .nbjm-recent__header {
	align-items: flex-end;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	justify-content: space-between;
	padding: 20px 16px 14px;
}

.nbjm-app .nbjm-recent__title {
	color: var(--nbj-primary);
	font-family: var(--nbjm-font-heading);
	font-size: clamp(1.35rem, 3.5cqi, 1.8rem);
	font-weight: 700;
	line-height: 1.2;
}

.nbjm-app .nbjm-recent__sub,
.nbjm-app .nbjm-recent__order {
	color: var(--nbjm-muted);
	font-size: 0.875rem;
}

.nbjm-app .nbjm-recent .nbjm-row__album,
.nbjm-app .nbjm-recent .nbjm-row__styles,
.nbjm-app .nbjm-recent .nbjm-row__duration,
.nbjm-app .nbjm-row__played {
	display: none;
}

.nbjm-app .nbjm-row__played {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
	white-space: nowrap;
}

/* Narrow: "Artist · 3 min ago" — the artist truncates, the time stays whole. */
.nbjm-app .nbjm-recent .nbjm-row__sub {
	display: flex;
}

.nbjm-app .nbjm-recent .nbjm-row__artist {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nbjm-app .nbjm-recent .nbjm-row__inline-album {
	flex: none;
	white-space: pre;
}

.nbjm-app .nbjm-row--static .nbjm-row__art {
	cursor: default;
}

.nbjm-app .nbjm-row--static .nbjm-row__title {
	font-weight: 600;
}

@container nbjm-main (min-width: 520px) {
	.nbjm-app .nbjm-recent .nbjm-tracks__head,
	.nbjm-app .nbjm-recent .nbjm-row {
		grid-template-columns: 28px 48px minmax(0, 1fr) 110px var(--nbjm-actions-width);
	}

	.nbjm-app .nbjm-recent .nbjm-tracks__head span:nth-child(3),
	.nbjm-app .nbjm-recent .nbjm-row__played {
		display: block;
	}

	.nbjm-app .nbjm-recent .nbjm-row__inline-album {
		display: none;
	}
}

/* Coming up: the station's next playlists and shows, above Recently Played. */
.nbjm-app .nbjm-schedule {
	background: var(--nbj-surface);
	border-radius: var(--nbj-radius);
	box-shadow: var(--nbjm-shadow);
	overflow: hidden;
}

.nbjm-app .nbjm-schedule[hidden] {
	display: none;
}

/* A button per day, today first; days with airings get a dot. */
.nbjm-app .nbjm-schedule__days {
	display: grid;
	gap: 6px;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	padding: 0 16px 14px;
}

.nbjm-app .nbjm-schedule__day {
	align-items: center;
	background: var(--nbj-soft);
	border: 0;
	border-radius: var(--nbjm-radius-sm);
	color: var(--nbj-primary);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font: inherit;
	gap: 2px;
	min-width: 0;
	padding: 8px 2px 10px;
	position: relative;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nbjm-app .nbjm-schedule__day:hover {
	background: color-mix(in srgb, var(--nbj-accent) 12%, var(--nbj-surface));
}

.nbjm-app .nbjm-schedule__day[aria-pressed="true"] {
	background: var(--nbj-primary);
	color: #fff;
}

.nbjm-app .nbjm-schedule__day-name {
	font-size: 0.72rem;
	font-weight: 600;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-schedule__day-date {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.1;
}

.nbjm-app .nbjm-schedule__day.has-airings::after {
	background: var(--nbj-accent);
	border-radius: 50%;
	bottom: 4px;
	content: "";
	height: 4px;
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
	width: 4px;
}

.nbjm-app .nbjm-schedule__empty {
	border-top: 1px solid var(--nbjm-border);
	color: var(--nbjm-muted);
	font-size: 0.9rem;
	padding: 18px 16px 20px;
	text-align: center;
}

.nbjm-app .nbjm-schedule__empty[hidden] {
	display: none;
}

.nbjm-app .nbjm-schedule__item.is-past {
	opacity: 0.55;
}

.nbjm-app .nbjm-schedule__item {
	align-items: center;
	border-top: 1px solid var(--nbjm-border);
	column-gap: 12px;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	padding: 10px 16px;
}

.nbjm-app .nbjm-schedule__item.is-live {
	background: color-mix(in srgb, var(--nbj-accent) 8%, var(--nbj-surface));
}

.nbjm-app .nbjm-schedule__item-art {
	align-items: center;
	background: linear-gradient(135deg, var(--nbj-soft), color-mix(in srgb, var(--nbj-accent) 22%, var(--nbj-background)));
	border-radius: 10px;
	color: var(--nbj-primary);
	display: flex;
	font-size: 1.25rem;
	height: 48px;
	justify-content: center;
	overflow: hidden;
	position: relative;
	width: 48px;
}

.nbjm-app .nbjm-schedule__item-art img {
	height: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
	width: 100%;
}

.nbjm-app .nbjm-schedule__item-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nbjm-app .nbjm-schedule__item-title,
.nbjm-app .nbjm-schedule__item-artist {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-schedule__item-title {
	color: var(--nbj-primary);
	font-weight: 700;
}

.nbjm-app .nbjm-schedule__item-artist,
.nbjm-app .nbjm-schedule__item-time {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
}

.nbjm-app .nbjm-schedule__item-time {
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
}

/* "Tomorrow" over "6:00 PM". */
.nbjm-app .nbjm-schedule__item-time time span,
.nbjm-app .nbjm-now__song-time time span {
	display: block;
}

.nbjm-app .nbjm-schedule__item-time time span:first-child,
.nbjm-app .nbjm-now__song-time time span:first-child {
	font-size: 0.75rem;
	font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* Playlist panel & reorderable items                                 */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-panel {
	align-self: start;
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 24px);
}

.nbjm-app .nbjm-playlist,
.nbjm-app .nbjm-queue {
	background: var(--nbj-surface);
	border-radius: var(--nbj-radius);
	box-shadow: var(--nbjm-shadow);
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 14px 16px;
}

.nbjm-app .nbjm-panel .nbjm-playlist {
	max-height: calc(100vh - var(--nbjm-player-height) - 64px - var(--wp-admin--admin-bar--height, 0px));
}

.nbjm-app .nbjm-panel .nbjm-items {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.nbjm-app .nbjm-playlist__header {
	align-items: center;
	display: flex;
	gap: 8px;
	padding: 0 4px 8px;
}

.nbjm-app .nbjm-playlist__title {
	align-items: center;
	color: var(--nbj-primary);
	display: flex;
	flex: 1 1 auto;
	font-family: var(--nbjm-font-heading);
	font-size: 1.3rem;
	font-weight: 700;
	gap: 0.45em;
	line-height: 1.2;
	min-width: 0;
}

.nbjm-app .nbjm-playlist__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-playlist__picker {
	align-items: center;
	display: flex;
	gap: 4px;
	padding: 0 4px 6px;
}

.nbjm-app .nbjm-playlist__select {
	background-color: var(--nbj-surface);
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%;
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	border: 1px solid var(--nbjm-border);
	border-radius: 10px;
	color: var(--nbj-primary);
	cursor: pointer;
	flex: 1 1 auto;
	font-size: 0.9rem;
	font-weight: 700;
	min-height: 38px;
	min-width: 0;
	padding: 0 1.8em 0 0.7em;
	text-overflow: ellipsis;
}

.nbjm-app .nbjm-playlist__form {
	background: var(--nbjm-accent-soft);
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 4px 6px;
	padding: 10px 12px;
}

.nbjm-app .nbjm-playlist__form-label {
	color: var(--nbj-primary);
	font-size: 0.875rem;
	font-weight: 700;
	margin: 0;
}

.nbjm-app .nbjm-playlist__input {
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 8px;
	color: var(--nbjm-text);
	font: inherit;
	min-height: 40px;
	padding: 0 0.7em;
	width: 100%;
}

.nbjm-app .nbjm-playlist__form-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nbjm-app .nbjm-playlist-view__title {
	display: flex;
	min-width: 0;
}

.nbjm-app .nbjm-playlist-view__bar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: space-between;
	margin-top: -8px;
}

.nbjm-app .nbjm-playlist-view__bar .nbjm-playlist__picker {
	flex: 1 1 320px;
	gap: 8px;
	max-width: 520px;
	padding: 0;
}

.nbjm-app .nbjm-playlist-view__meta {
	color: var(--nbjm-muted);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	margin: 0;
}

.nbjm-app .nbjm-playlist-view .nbjm-playlist__form {
	margin: -8px 0 0;
	max-width: 520px;
}

/* A shared playlist link: read-only, so the visitor's own playlist controls step aside. */
.nbjm-app .nbjm-shared-banner {
	align-items: center;
	background: var(--nbjm-accent-soft);
	border: 1px solid var(--nbjm-border);
	border-radius: var(--nbjm-radius-sm);
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: space-between;
	margin-top: -8px;
	padding: 10px 14px;
}

.nbjm-app .nbjm-shared-banner[hidden] {
	display: none;
}

.nbjm-app .nbjm-shared-banner__text {
	align-items: center;
	display: flex;
	font-size: 0.9375rem;
	gap: 8px;
	margin: 0;
}

.nbjm-app .nbjm-shared-banner__text .nbjm-icon {
	color: var(--nbjm-accent-text);
	flex: none;
}

.nbjm-app .nbjm-shared-banner__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.nbjm-app .nbjm-playlist-view[data-shared] .nbjm-playlist__picker,
.nbjm-app .nbjm-playlist-view[data-shared] .nbjm-playlist__form:not([data-mode="save"]),
.nbjm-app .nbjm-playlist-view[data-shared] .nbjm-playlist__links {
	display: none;
}

/* Sortable rows: a grip handle replaces the number in the # column. */
.nbjm-app .nbjm-row--sortable .nbjm-row__number,
.nbjm-app .nbjm-row--sortable.is-current .nbjm-eq {
	display: none;
}

.nbjm-app .nbjm-row__handle {
	align-items: center;
	border-radius: 8px;
	color: color-mix(in srgb, var(--nbjm-muted) 70%, transparent);
	cursor: grab;
	display: flex;
	height: 44px;
	justify-content: center;
	touch-action: none;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
	width: 28px;
}

.nbjm-app .nbjm-row--sortable.is-current .nbjm-row__handle {
	color: var(--nbj-accent);
}

.nbjm-app .nbjm-row__handle:active {
	cursor: grabbing;
}

.nbjm-app .nbjm-row.is-dragging {
	background: var(--nbj-surface);
	box-shadow: 0 10px 24px rgba(var(--nbjm-shade), 0.18);
	will-change: transform;
	z-index: 2;
}

/* The released row stays on top while it slides into its slot. */
.nbjm-app .nbjm-row.is-settling {
	background: var(--nbj-surface);
	z-index: 2;
}

.nbjm-app .nbjm-tracklist.is-reordering {
	-webkit-user-select: none;
	user-select: none;
}

/* Move buttons for keyboard/screen-reader users, shown while focused. */
.nbjm-app .nbjm-row__move {
	background: var(--nbj-surface);
	border-radius: 10px;
	box-shadow: var(--nbjm-shadow);
	display: flex;
	gap: 2px;
	height: 1px;
	left: 44px;
	opacity: 0;
	overflow: hidden;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
}

.nbjm-app .nbjm-row__move:focus-within {
	height: auto;
	opacity: 1;
	overflow: visible;
	width: auto;
	z-index: 3;
}

@container nbjm-main (max-width: 519px) {
	.nbjm-app .nbjm-row.nbjm-row--sortable {
		grid-template-columns: 28px 44px minmax(0, 1fr) var(--nbjm-actions-width);
		padding-left: 6px;
	}

	.nbjm-app .nbjm-row--sortable .nbjm-row__index {
		display: block;
	}
}

.nbjm-app .nbjm-playlist__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	justify-content: center;
}

.nbjm-app .nbjm-playlist__duration {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
}

.nbjm-app .nbjm-drawer__close {
	display: none;
}

.nbjm-app dialog .nbjm-drawer__close {
	display: inline-flex;
}

.nbjm-app .nbjm-playlist__actions {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 10px;
}

.nbjm-app .nbjm-playlist__actions .nbjm-btn {
	min-height: 44px;
}

.nbjm-app .nbjm-item {
	align-items: center;
	border-radius: 12px;
	display: grid;
	gap: 8px;
	grid-template-columns: 28px 44px minmax(0, 1fr) auto auto;
	padding: 6px 4px;
	position: relative;
}

.nbjm-app .nbjm-item--static {
	grid-template-columns: 44px minmax(0, 1fr) auto;
}

.nbjm-app .nbjm-item:hover {
	background: var(--nbjm-hover);
}

.nbjm-app .nbjm-item.is-current {
	background: color-mix(in srgb, var(--nbj-accent) 8%, var(--nbj-surface));
}

.nbjm-app .nbjm-item.is-dragging {
	background: var(--nbj-surface);
	box-shadow: 0 10px 24px rgba(var(--nbjm-shade), 0.18);
	will-change: transform;
	z-index: 2;
}

/* The released row stays on top while it slides into its slot. */
.nbjm-app .nbjm-item.is-settling {
	background: var(--nbj-surface);
	z-index: 2;
}

.nbjm-app .nbjm-items.is-reordering {
	-webkit-user-select: none;
	user-select: none;
}

.nbjm-app .nbjm-item__handle {
	align-items: center;
	border-radius: 8px;
	color: color-mix(in srgb, var(--nbjm-muted) 70%, transparent);
	cursor: grab;
	display: flex;
	height: 44px;
	justify-content: center;
	touch-action: none;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
	width: 28px;
}

.nbjm-app .nbjm-item__handle:active {
	cursor: grabbing;
}

.nbjm-app .nbjm-item__art {
	background: linear-gradient(135deg, var(--nbj-soft), color-mix(in srgb, var(--nbj-accent) 22%, var(--nbj-background)));
	border-radius: 10px;
	height: 44px;
	overflow: hidden;
	position: relative;
	width: 44px;
}

.nbjm-app .nbjm-item__art img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nbjm-app .nbjm-item__art .nbjm-eq {
	background: rgba(var(--nbjm-shade), 0.45);
	display: none;
	height: auto;
	inset: 0;
	padding: 14px 0;
	position: absolute;
}

.nbjm-app .nbjm-item.is-current .nbjm-item__art .nbjm-eq {
	display: flex;
}

.nbjm-app .nbjm-item__art .nbjm-eq i {
	background: #fff;
}

.nbjm-app .nbjm-item__main {
	display: flex;
	flex-direction: column;
	min-height: 44px;
	justify-content: center;
	min-width: 0;
	text-align: left;
}

.nbjm-app .nbjm-item__title {
	color: var(--nbj-primary);
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-item.is-current .nbjm-item__title {
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-item__meta {
	color: var(--nbjm-muted);
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
}

/* Move buttons stay available to assistive tech, visible on keyboard focus. */
.nbjm-app .nbjm-item__move {
	display: flex;
	gap: 2px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	width: 1px;
}

.nbjm-app .nbjm-item__move:focus-within {
	height: auto;
	opacity: 1;
	overflow: visible;
	width: auto;
}

.nbjm-app .nbjm-item__remove {
	height: 36px;
	width: 36px;
}

/* ------------------------------------------------------------------ */
/* Drawers (dialog)                                                   */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-drawer {
	background: transparent;
	border: 0;
	color: var(--nbjm-text);
	height: 100%;
	inset: 0 0 0 auto;
	margin: 0;
	max-height: none;
	max-width: 100vw;
	padding: 0;
	position: fixed;
	width: min(420px, 100vw);
}

.nbjm-app .nbjm-drawer::backdrop {
	background: rgba(var(--nbjm-shade), 0.35);
	backdrop-filter: blur(2px);
}

.nbjm-app .nbjm-drawer[open] {
	animation: nbjm-slide-in 0.22s ease-out;
	display: flex;
}

.nbjm-app .nbjm-drawer > .nbjm-queue {
	border-radius: var(--nbj-radius) 0 0 var(--nbj-radius);
	flex: 1 1 auto;
	max-height: 100%;
	overflow: hidden;
	padding-bottom: calc(16px + var(--nbjm-safe-bottom));
}

.nbjm-app .nbjm-drawer .nbjm-items {
	flex: 0 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.nbjm-app .nbjm-drawer .nbjm-items--current {
	flex: none;
	overflow: visible;
}

.nbjm-app .nbjm-queue__label {
	color: var(--nbjm-muted);
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 10px 4px 4px;
	text-transform: uppercase;
}

/* Live radio row and the paused queue below it. */
.nbjm-app .nbjm-item--live .nbjm-item__meta {
	align-items: center;
	display: flex;
	gap: 6px;
	min-width: 0;
}

.nbjm-app .nbjm-item--live .nbjm-live-badge {
	flex: none;
	font-size: 0.6rem;
}

.nbjm-app .nbjm-queue__paused {
	align-items: flex-end;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding-right: 4px;
}

.nbjm-app .nbjm-queue__paused[hidden] {
	display: none;
}

.nbjm-app .nbjm-queue__hint {
	color: var(--nbjm-muted);
	font-size: 0.8rem;
	margin: 0;
	padding: 0 4px 4px;
}

.nbjm-app .nbjm-queue__paused .nbjm-btn {
	flex: none;
	margin-bottom: 4px;
}

.nbjm-app .nbjm-queue__more {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
	padding: 6px 4px;
}

.nbjm-app .nbjm-queue__actions {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 12px;
}

/* Bottom sheet on phones. */
@media (max-width: 759px) {
	.nbjm-app .nbjm-drawer {
		height: auto;
		inset: auto 0 0 0;
		max-height: 88vh;
		max-height: 88dvh;
		width: 100vw;
	}

	.nbjm-app .nbjm-drawer[open] {
		animation-name: nbjm-slide-up;
	}

	.nbjm-app .nbjm-drawer > .nbjm-queue {
		border-radius: var(--nbj-radius) var(--nbj-radius) 0 0;
	}
}

/* Send feedback sheet (feedback-sheet.php); reuses the profile panel's header and labels. */
.nbjm-app .nbjm-drawer > .nbjm-feedback {
	gap: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 20px 18px calc(18px + var(--nbjm-safe-bottom));
}

.nbjm-app .nbjm-feedback__icon {
	color: var(--nbj-accent);
	line-height: 0;
}

.nbjm-app .nbjm-feedback__icon .nbjm-icon {
	height: 28px;
	width: 28px;
}

.nbjm-app .nbjm-feedback .nbjm-profile__colors + .nbjm-profile__label {
	margin-top: 8px;
}

.nbjm-app .nbjm-feedback__message {
	line-height: 1.45;
	min-height: 8em;
	padding: 0.6em 0.7em;
	resize: vertical;
}

/* The honeypot: off screen, out of the way of people and screen readers. */
.nbjm-app .nbjm-feedback__trap {
	height: 1px;
	left: -9999px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

.nbjm-app .nbjm-feedback__status:empty {
	display: none;
}

.nbjm-app .nbjm-feedback__status.is-error {
	border-left: 3px solid var(--nbj-accent);
	color: var(--nbjm-text);
	padding-left: 10px;
}

.nbjm-app .nbjm-feedback .nbjm-settings__actions {
	justify-content: flex-end;
	margin-top: 4px;
}

.nbjm-app .nbjm-feedback__done {
	align-items: center;
	display: flex;
	flex-direction: column;
	padding: 32px 8px 8px;
	text-align: center;
}

.nbjm-app .nbjm-feedback__done[hidden],
.nbjm-app .nbjm-feedback .nbjm-profile__form[hidden] {
	display: none;
}

.nbjm-app .nbjm-feedback__done-icon {
	align-items: center;
	background: var(--nbj-soft);
	border-radius: 50%;
	color: var(--nbj-primary);
	display: flex;
	height: 56px;
	justify-content: center;
	width: 56px;
}

.nbjm-app .nbjm-feedback__done-icon .nbjm-icon {
	height: 30px;
	width: 30px;
}

.nbjm-app .nbjm-feedback__done-title {
	color: var(--nbj-primary);
	font-family: var(--nbjm-font-heading);
	font-size: 1.35rem;
	font-weight: 700;
	margin: 14px 0 4px;
}

.nbjm-app .nbjm-feedback__done-text {
	color: var(--nbjm-muted);
	margin: 0 0 20px;
}

.nbjm-app .nbjm-feedback__done .nbjm-settings__actions {
	justify-content: center;
}

/* Email signup sheet. */
.nbjm-app .nbjm-drawer > .nbjm-signup {
	align-items: center;
	gap: 0;
	overflow-y: auto;
	padding-top: 24px;
	position: relative;
	text-align: center;
}

.nbjm-app .nbjm-signup .nbjm-playlist__header {
	padding: 0;
	position: absolute;
	right: 10px;
	top: 10px;
}

.nbjm-app .nbjm-signup__bell {
	color: var(--nbj-accent);
	line-height: 0;
}

.nbjm-app .nbjm-signup__bell .nbjm-icon {
	height: 40px;
	transform-origin: 50% 10%;
	width: 40px;
}

/* One ring each time the sheet opens. */
.nbjm-app .nbjm-drawer--signup[open] .nbjm-signup__bell .nbjm-icon {
	animation: nbjm-bell-ring 4s ease-in-out 0.3s 1;
}

/* The homepage bell's swing: a quick ring, then rest. */
@keyframes nbjm-bell-ring {
	0%, 20%, 100% { transform: rotate(0); }
	3% { transform: rotate(16deg); }
	6% { transform: rotate(-14deg); }
	9% { transform: rotate(10deg); }
	12% { transform: rotate(-8deg); }
	15% { transform: rotate(4deg); }
	18% { transform: rotate(-2deg); }
}

.nbjm-app .nbjm-signup__title {
	color: var(--nbj-primary);
	font-family: var(--nbjm-font-heading);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.25;
	margin: 10px 8px 6px;
}

.nbjm-app .nbjm-signup__text {
	color: var(--nbjm-muted);
	margin: 0 8px;
}

.nbjm-app .nbjm-signup__form {
	align-self: stretch;
	min-height: 120px;
	text-align: left;
}

/* EmailOctopus wraps its form in a padded dark box; let it sit on the sheet. */
.nbjm-app .nbjm-signup__form :is(.inline-container, .eo-form-wrapper, .form-container, .emailoctopus-form-wrapper, .emailoctopus-form) {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	margin: 0 !important;
	max-width: 100% !important;
	padding: 0 !important;
	width: 100% !important;
}

.nbjm-app .nbjm-signup__form .emailoctopus-form-wrapper {
	margin-top: 16px !important;
}

.nbjm-app .nbjm-signup__form .emailoctopus-form input:not([type="submit"]) {
	border: 1px solid var(--nbjm-border);
	border-radius: 999px;
	font-size: 1rem; /* 16px: iOS won't zoom in on focus. */
	min-height: 52px;
	padding: 0 20px;
}

.nbjm-app .nbjm-signup__form .emailoctopus-form input[type="submit"] {
	background: var(--nbj-accent);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 700;
	min-height: 52px;
}

.nbjm-app .nbjm-signup__form .text-center {
	display: none; /* EmailOctopus branding. */
}

.nbjm-app .nbjm-signup__already {
	margin-top: 4px;
}

/* A theme's own signup block, hidden once the visitor has subscribed. */
html.nbjm-signup-hide [data-nbjm-signup-section] {
	display: none !important;
}

/* "Get notified" on a page with its own signup form: point at its email field.
   (That form is in the theme's content, outside .nbjm-app.) */
.nbjm-signup-flash {
	animation: nbjm-signup-flash 0.8s ease-in-out 3;
}

@keyframes nbjm-signup-flash {
	50% {
		box-shadow: 0 0 0 5px color-mix(in srgb, var(--nbj-accent, #FF5A26) 45%, transparent);
	}
}

@media (prefers-reduced-motion: reduce) {
	/* html: outranks the tab bar rule further down. */
	html .nbjm-app .nbjm-tabbar__slot--notify .nbjm-icon,
	html .nbjm-app .nbjm-drawer--signup[open] .nbjm-signup__bell .nbjm-icon {
		animation: none;
	}

	.nbjm-signup-flash {
		animation: none;
		box-shadow: 0 0 0 3px color-mix(in srgb, var(--nbj-accent, #FF5A26) 45%, transparent);
	}
}

/* ------------------------------------------------------------------ */
/* Row menu & toast                                                   */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-menu {
	background: var(--nbj-surface);
	border: 1px solid var(--nbjm-border);
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(var(--nbjm-shade), 0.18);
	display: flex;
	flex-direction: column;
	color: var(--nbj-primary);
	inset: auto; /* Undo the popover defaults: script or anchor places it. */
	margin: 0;
	min-width: 220px;
	padding: 6px;
	position: fixed;
	z-index: 100001; /* Only matters without popover support (no top layer). */
}

.nbjm-app .nbjm-menu[popover]:not(:popover-open) {
	display: none;
}

/*
 * Anchored to its ⋯ button (the script gives the open button this
 * anchor-name): below it, right edges lined up, flipping above when the
 * player and tab bar leave no room, and leftward/rightward near the edges.
 */
@supports (anchor-name: --a) {
	.nbjm-app .nbjm-menu.is-anchored {
		margin: 6px 0 calc(var(--nbjm-player-height) + var(--nbjm-tabbar-height) + var(--nbjm-safe-bottom) + 8px);
		position-anchor: --nbjm-row-menu;
		position-area: block-end span-inline-start;
		position-try-fallbacks: --nbjm-menu-above, flip-inline, --nbjm-menu-above flip-inline;
	}

	@position-try --nbjm-menu-above {
		margin: 8px 0 6px;
		position-area: block-start span-inline-start;
	}
}

.nbjm-app .nbjm-menu :is([role="menuitem"], [role="menuitemradio"]) {
	align-items: center;
	border-radius: 10px;
	color: var(--nbj-primary);
	display: flex;
	font-size: 0.92rem;
	font-weight: 600;
	gap: 0.7em;
	min-height: 42px;
	padding: 0.5em 0.8em;
	text-align: left;
	text-decoration: none;
}

.nbjm-app .nbjm-menu :is([role="menuitem"], [role="menuitemradio"]):hover,
.nbjm-app .nbjm-menu :is([role="menuitem"], [role="menuitemradio"]):focus-visible {
	background: var(--nbjm-accent-soft);
	color: var(--nbjm-accent-text);
	outline-offset: -3px;
}

.nbjm-app .nbjm-toast {
	background: var(--nbjm-inverse-bg);
	border-radius: 999px;
	bottom: calc(var(--nbjm-player-height) + var(--nbjm-tabbar-height) + var(--nbjm-safe-bottom) + 16px);
	box-shadow: 0 10px 30px rgba(var(--nbjm-shade), 0.3);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	left: 50%;
	max-width: calc(100vw - 32px);
	opacity: 0;
	padding: 0.7em 1.3em;
	pointer-events: none;
	position: fixed;
	text-align: center;
	transform: translate(-50%, 10px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 100000;
}

.nbjm-app .nbjm-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.nbjm-app .nbjm-toast:empty {
	visibility: hidden;
}

/* ------------------------------------------------------------------ */
/* Player bar                                                         */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-player {
	align-items: center;
	background: color-mix(in srgb, var(--nbj-background) 55%, var(--nbj-surface));
	border-top: 1px solid var(--nbjm-border);
	bottom: 0;
	box-shadow: 0 -10px 30px rgba(var(--nbjm-shade), 0.08);
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
	left: 0;
	min-height: var(--nbjm-player-height);
	padding: 10px max(20px, env(safe-area-inset-right)) calc(10px + var(--nbjm-safe-bottom)) max(20px, env(safe-area-inset-left));
	position: fixed;
	right: 0;
	z-index: 99990;
}

@supports (backdrop-filter: blur(1px)) {
	.nbjm-app .nbjm-player {
		backdrop-filter: blur(14px);
		background: color-mix(in srgb, color-mix(in srgb, var(--nbj-background) 55%, var(--nbj-surface)) 92%, transparent);
	}
}

/*
 * Artwork glow (Settings → Artwork glow): the cover's color, from JS as
 * --nbjm-art-tint, softly behind the player bar and the Live Radio card.
 * It fades in, and from song to song where the browser can animate colors.
 */
@property --nbjm-art-tint {
	syntax: "<color>";
	inherits: true;
	initial-value: transparent;
}

.nbjm-app .nbjm-player,
.nbjm-app .nbjm-radio {
	isolation: isolate;
}

.nbjm-app .nbjm-radio {
	position: relative;
}

.nbjm-app .nbjm-player::before,
.nbjm-app .nbjm-radio::before {
	border-radius: inherit;
	content: "";
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	transition: opacity 0.6s ease, --nbjm-art-tint 0.8s ease;
	z-index: -1;
}

.nbjm-app .nbjm-player::before {
	background: radial-gradient(50% 220% at 0% 50%, color-mix(in srgb, var(--nbjm-art-tint) 26%, transparent) 0%, transparent 100%);
}

.nbjm-app .nbjm-radio::before {
	background: radial-gradient(100% 80% at 20% 0%, color-mix(in srgb, var(--nbjm-art-tint) 24%, transparent) 0%, transparent 100%);
}

.nbjm-app .has-art-tint::before {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.nbjm-app .nbjm-player::before,
	.nbjm-app .nbjm-radio::before {
		transition: none;
	}
}

.nbjm-app .nbjm-player__now {
	align-items: center;
	display: flex;
	gap: 12px;
	min-width: 0;
}

.nbjm-app .nbjm-player__art {
	background: linear-gradient(135deg, var(--nbj-soft), color-mix(in srgb, var(--nbj-accent) 25%, var(--nbj-background)));
	border-radius: 12px;
	flex: none;
	height: 56px;
	overflow: hidden;
	position: relative;
	width: 56px;
}

.nbjm-app .nbjm-player__art img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nbjm-app .nbjm-player__art-fallback {
	align-items: center;
	color: var(--nbj-primary);
	display: flex;
	font-size: 1.4rem;
	inset: 0;
	justify-content: center;
	opacity: 0.55;
	position: absolute;
}

.nbjm-app .nbjm-player__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nbjm-app .nbjm-player__title {
	color: var(--nbj-primary);
	font-weight: 700;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Scrolling ticker text (the song on air in the Live Radio card), set up by JS. */
.nbjm-app .is-marquee {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 4px, #000 calc(100% - 28px), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 4px, #000 calc(100% - 28px), transparent 100%);
	overflow: hidden;
	white-space: nowrap;
}

.nbjm-app .nbjm-marquee__track {
	animation: nbjm-marquee var(--nbjm-marquee-duration, 10s) linear infinite;
	display: inline-flex;
	will-change: transform;
}

.nbjm-app .nbjm-marquee__track > span {
	flex: none;
	padding-right: var(--nbjm-marquee-gap, 3em);
}

.nbjm-app .nbjm-marquee__line {
	display: block;
}

/* Second line under the ticker text (the album of the song on air). */
.nbjm-app .nbjm-marquee__sub {
	color: var(--nbjm-muted);
	font-size: 0.8em;
	font-weight: 600;
}

.nbjm-app .is-marquee:hover .nbjm-marquee__track {
	animation-play-state: paused;
}

@keyframes nbjm-marquee {
	0%,
	20% {
		transform: translateX(0);
	}

	100% {
		transform: translateX(-50%);
	}
}

.nbjm-app .nbjm-player__artist {
	color: var(--nbjm-muted);
	font-size: 0.85rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-player__center {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.nbjm-app .nbjm-player__controls {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: center;
}

.nbjm-app .nbjm-player__controls .nbjm-icon-btn {
	color: var(--nbj-primary);
}

.nbjm-app .nbjm-toggle[aria-pressed="true"],
.nbjm-app .nbjm-toggle.is-active {
	color: var(--nbjm-accent-text);
	position: relative;
}

.nbjm-app .nbjm-toggle[aria-pressed="true"]::after,
.nbjm-app .nbjm-toggle.is-active::after {
	background: currentColor;
	border-radius: 50%;
	bottom: 3px;
	content: "";
	height: 4px;
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
	width: 4px;
}

.nbjm-app [data-repeat] .nbjm-icon--repeat-one,
.nbjm-app [data-repeat="one"] .nbjm-icon--repeat {
	display: none;
}

.nbjm-app [data-repeat="one"] .nbjm-icon--repeat-one {
	display: inline-block;
}

.nbjm-app .nbjm-play-btn {
	align-items: center;
	background: var(--nbj-accent);
	border-radius: 50%;
	box-shadow: 0 8px 18px color-mix(in srgb, var(--nbj-accent) 38%, transparent);
	color: #fff;
	display: inline-flex;
	flex: none;
	font-size: 1.35rem;
	height: 52px;
	justify-content: center;
	position: relative;
	transition: background-color 0.15s ease, transform 0.15s ease;
	width: 52px;
}

.nbjm-app .nbjm-play-btn:hover {
	background: var(--nbjm-accent-strong);
}

.nbjm-app .nbjm-play-btn:active {
	transform: scale(0.96);
}

.nbjm-app .nbjm-play-btn.is-playing .nbjm-icon--play {
	display: none;
}

.nbjm-app .nbjm-play-btn.is-playing .nbjm-icon--pause {
	display: inline-block;
}

/* Playback failed (e.g. the connection dropped): the button tries again. */
.nbjm-app .nbjm-icon--retry,
.nbjm-app .nbjm-play-btn.is-retry:has(.nbjm-icon--retry) :is(.nbjm-icon--play, .nbjm-icon--pause) {
	display: none;
}

.nbjm-app .nbjm-play-btn.is-retry .nbjm-icon--retry {
	display: inline-block;
}

.nbjm-app .nbjm-spinner {
	animation: nbjm-spin 0.9s linear infinite;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	border-top-color: #fff;
	display: none;
	inset: -3px;
	position: absolute;
}

.nbjm-app .nbjm-player.is-loading .nbjm-spinner {
	display: block;
}

.nbjm-app .nbjm-player__progress {
	align-items: center;
	display: flex;
	gap: 10px;
}

.nbjm-app .nbjm-player__time {
	color: var(--nbjm-muted);
	flex: none;
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	min-width: 2.8em;
	text-align: center;
}

.nbjm-app .nbjm-player.is-live .nbjm-player__time,
.nbjm-app .nbjm-player.is-live .nbjm-range--seek {
	display: none;
}

.nbjm-app .nbjm-player__live {
	margin: 4px auto 0;
}

.nbjm-app .nbjm-player__extras {
	align-items: center;
	display: flex;
	gap: 6px;
	justify-content: flex-end;
}

.nbjm-app .nbjm-range--volume {
	max-width: 120px;
}

/* Range inputs (seek and volume). */
.nbjm-app .nbjm-range {
	--nbjm-fill: 0%;
	background: transparent;
	cursor: pointer;
	flex: 1 1 auto;
	height: 24px;
	min-width: 60px;
}

.nbjm-app .nbjm-range:disabled {
	cursor: default;
	opacity: 0.5;
}

.nbjm-app .nbjm-range::-webkit-slider-runnable-track {
	background: linear-gradient(to right, var(--nbj-accent) var(--nbjm-fill), color-mix(in srgb, var(--nbj-primary) 14%, transparent) var(--nbjm-fill));
	border-radius: 999px;
	height: 5px;
}

.nbjm-app .nbjm-range::-moz-range-track {
	background: color-mix(in srgb, var(--nbj-primary) 14%, transparent);
	border-radius: 999px;
	height: 5px;
}

.nbjm-app .nbjm-range::-moz-range-progress {
	background: var(--nbj-accent);
	border-radius: 999px;
	height: 5px;
}

.nbjm-app .nbjm-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	background: var(--nbj-accent);
	border: 2px solid var(--nbj-surface);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(var(--nbjm-shade), 0.3);
	height: 16px;
	margin-top: -5.5px;
	width: 16px;
}

.nbjm-app .nbjm-range::-moz-range-thumb {
	background: var(--nbj-accent);
	border: 2px solid var(--nbj-surface);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(var(--nbjm-shade), 0.3);
	height: 16px;
	width: 16px;
}

.nbjm-app .nbjm-range:focus-visible {
	border-radius: 999px;
	outline-offset: 0;
}

/* Phones: the player floats as a card above the tab bar (Spotify-style). */
@media (max-width: 759px) {
	.nbjm-app .nbjm-player {
		background: var(--nbj-surface);
		border: 1px solid var(--nbjm-border);
		border-radius: 12px;
		bottom: calc(var(--nbjm-tabbar-height) + var(--nbjm-safe-bottom));
		box-shadow: 0 8px 24px rgba(var(--nbjm-shade), 0.16);
		gap: 2px;
		grid-template-areas: "art meta queue fav play";
		grid-template-columns: auto minmax(0, 1fr) auto auto auto;
		left: max(8px, env(safe-area-inset-left));
		min-height: 56px;
		padding: 7px 6px 7px 7px;
		right: max(8px, env(safe-area-inset-right));
	}

	.nbjm-app .nbjm-player__now,
	.nbjm-app .nbjm-player__center,
	.nbjm-app .nbjm-player__extras {
		display: contents;
	}

	.nbjm-app .nbjm-player__art {
		border-radius: 6px;
		grid-area: art;
		height: 40px;
		margin-right: 8px;
		width: 40px;
	}

	.nbjm-app .nbjm-player__meta {
		grid-area: meta;
	}

	.nbjm-app .nbjm-player__title {
		font-size: 0.92rem;
	}

	.nbjm-app .nbjm-player__artist {
		font-size: 0.8rem;
	}

	.nbjm-app .nbjm-player .nbjm-fav {
		grid-area: fav;
	}

	.nbjm-app .nbjm-player__extras [data-action="open-queue"] {
		grid-area: queue;
	}

	.nbjm-app .nbjm-player__controls {
		grid-area: play;
	}

	.nbjm-app .nbjm-player__controls [data-action="shuffle"],
	.nbjm-app .nbjm-player__controls [data-action="repeat"],
	.nbjm-app .nbjm-player__controls [data-action="prev"],
	.nbjm-app .nbjm-player__controls [data-action="next"],
	.nbjm-app .nbjm-player__extras [data-action="mute"],
	.nbjm-app .nbjm-player__extras [data-action="mini-player"],
	.nbjm-app .nbjm-range--volume,
	.nbjm-app .nbjm-player__time,
	.nbjm-app .nbjm-player__share,
	.nbjm-app .nbjm-player__expand {
		display: none;
	}

	.nbjm-app .nbjm-player .nbjm-icon-btn {
		color: var(--nbj-primary);
		font-size: 1.1rem;
	}

	.nbjm-app .nbjm-player .nbjm-fav[aria-pressed="true"] {
		color: var(--nbj-accent);
	}

	/* The brand play circle, sized to the card. */
	.nbjm-app .nbjm-play-btn {
		box-shadow: 0 4px 10px color-mix(in srgb, var(--nbj-accent) 30%, transparent);
		font-size: 1.2rem;
		height: 40px;
		margin-left: 4px;
		width: 40px;
	}

	/* Thin progress line along the card's bottom edge; the thumb shows while seeking. */
	.nbjm-app .nbjm-player__progress {
		bottom: -7px;
		left: 10px;
		position: absolute;
		right: 10px;
	}

	.nbjm-app .nbjm-player__progress .nbjm-range--seek {
		height: 16px;
		min-width: 0;
	}

	.nbjm-app .nbjm-range--seek::-webkit-slider-runnable-track {
		height: 2px;
	}

	.nbjm-app .nbjm-range--seek::-moz-range-track,
	.nbjm-app .nbjm-range--seek::-moz-range-progress {
		height: 2px;
	}

	.nbjm-app .nbjm-range--seek::-webkit-slider-thumb {
		border: 0;
		height: 12px;
		margin-top: -5px;
		transform: scale(0);
		transition: transform 0.15s ease;
		width: 12px;
	}

	.nbjm-app .nbjm-range--seek::-moz-range-thumb {
		border: 0;
		height: 12px;
		transform: scale(0);
		transition: transform 0.15s ease;
		width: 12px;
	}

	.nbjm-app .nbjm-range--seek:active::-webkit-slider-thumb,
	.nbjm-app .nbjm-range--seek:focus-visible::-webkit-slider-thumb {
		transform: scale(1);
	}

	.nbjm-app .nbjm-range--seek:active::-moz-range-thumb,
	.nbjm-app .nbjm-range--seek:focus-visible::-moz-range-thumb {
		transform: scale(1);
	}

	/* Live: no seek line, so the badge sits on the card's top edge, centered over the art
	   (7px padding + half the 40px art). */
	.nbjm-app .nbjm-player.is-live .nbjm-player__progress {
		bottom: auto;
		left: 27px;
		right: auto;
		top: -9px;
		transform: translateX(-50%);
	}

	.nbjm-app .nbjm-player__live {
		margin: 0;
	}

	.nbjm-app .nbjm-toast {
		border-radius: 14px;
	}
}

/* The bar's artwork and title open the Now Playing sheet. */
.nbjm-app .nbjm-player__art[data-action] {
	padding: 0;
	transition: transform 0.15s ease;
}

.nbjm-app .nbjm-player__art[data-action]:disabled {
	cursor: default;
	opacity: 1;
}

.nbjm-app .nbjm-player__art[data-action]:not(:disabled):active {
	transform: scale(0.95);
}

.nbjm-app .nbjm-player:not([data-mode="idle"]) .nbjm-player__meta[data-action] {
	cursor: pointer;
}

/* On desktop, hovering the artwork reveals an expand chevron so it reads as clickable. */
.nbjm-app .nbjm-player__art-expand {
	display: none;
}

@media (min-width: 760px) {
	.nbjm-app .nbjm-player__art-expand {
		align-items: center;
		background: rgba(0, 0, 0, 0.42);
		color: #fff;
		display: flex;
		font-size: 1.3rem;
		inset: 0;
		justify-content: center;
		opacity: 0;
		pointer-events: none;
		position: absolute;
		transition: opacity 0.15s ease;
		z-index: 1;
	}

	.nbjm-app .nbjm-player:not([data-mode="idle"]) .nbjm-player__art:focus-visible .nbjm-player__art-expand {
		opacity: 1;
	}
}

@media (min-width: 760px) and (hover: hover) {
	.nbjm-app .nbjm-player:not([data-mode="idle"]) .nbjm-player__art:hover .nbjm-player__art-expand {
		opacity: 1;
	}

	.nbjm-app .nbjm-player:not([data-mode="idle"]) .nbjm-player__meta[data-action]:hover .nbjm-player__title {
		text-decoration: underline;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nbjm-app .nbjm-player__art-expand {
		transition: none;
	}
}

/* ------------------------------------------------------------------ */
/* Now Playing sheet (now-playing.php)                                */
/* ------------------------------------------------------------------ */

/*
 * Full screen, always light-on-dark so the text reads on any cover: the
 * cover's color (--nbjm-art-tint, or the brand navy) deepened, the cover
 * itself blurred over it, and two soft glows drifting slowly.
 */
@property --nbjm-now-tint {
	syntax: "<color>";
	inherits: true;
	initial-value: #173b70;
}

.nbjm-app .nbjm-now {
	--nbjm-now-tint: var(--nbj-primary);
	--nbjm-now-text: #fff;
	--nbjm-now-muted: rgba(255, 255, 255, 0.72);
	--nbjm-now-faint: rgba(255, 255, 255, 0.24);
	/* The solid color at the sheet's top and bottom edges; the page behind takes it too (see html.nbjm-now-open). */
	--nbjm-now-edge: color-mix(in srgb, color-mix(in srgb, var(--nbjm-now-tint) 58%, #05070d) 62%, #000);
	/* Albums with a scene: JS sets these inline to the scene's own top and bottom colors. */
	--nbjm-now-edge-top: var(--nbjm-now-edge);
	--nbjm-now-edge-bottom: var(--nbjm-now-edge);
	background: var(--nbjm-now-edge-bottom);
	border: 0;
	color: var(--nbjm-now-text);
	height: 100%;
	inset: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	overflow: hidden;
	padding: 0;
	position: fixed;
	transition: --nbjm-now-tint 0.9s ease;
	width: 100%;
}

.nbjm-app .nbjm-now.has-art-tint {
	--nbjm-now-tint: var(--nbjm-art-tint);
}

.nbjm-app .nbjm-now[open] {
	animation: nbjm-now-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
	display: block;
}

.nbjm-app .nbjm-now::backdrop {
	background: rgba(var(--nbjm-shade), 0.3);
}

/* Global .has-art-tint::before is the bar's glow; the sheet draws its own. */
.nbjm-app .nbjm-now::before {
	display: none;
}

@keyframes nbjm-now-in {
	from { opacity: 0; transform: translateY(6%); }
	to { opacity: 1; transform: none; }
}

.nbjm-app .nbjm-now__backdrop {
	background: color-mix(in srgb, var(--nbjm-now-tint) 58%, #05070d);
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	position: absolute;
}

.nbjm-app .nbjm-now__backdrop img {
	filter: blur(64px) saturate(1.5) brightness(0.8);
	height: 130%;
	left: -15%;
	object-fit: cover;
	opacity: 0.5;
	position: absolute;
	top: -15%;
	width: 130%;
}

.nbjm-app .nbjm-now__backdrop::before {
	animation: nbjm-now-drift 28s ease-in-out infinite alternate;
	background:
		radial-gradient(40% 35% at 25% 25%, color-mix(in srgb, var(--nbjm-now-tint) 80%, #fff) 0%, transparent 100%),
		radial-gradient(45% 40% at 80% 70%, color-mix(in srgb, var(--nbjm-now-tint) 85%, var(--nbj-accent)) 0%, transparent 100%);
	content: "";
	inset: -20%;
	opacity: 0.3;
	position: absolute;
}

/*
 * Albums with a scene: the illustration itself, full-bleed, in place of the
 * blurred cover (and the glows it covers), cropped around the focus point
 * set in the album's Scene box (inline object-position from JS).
 */
.nbjm-app .nbjm-now__backdrop .nbjm-now__scene {
	filter: blur(0) brightness(0.85);
	height: 100%;
	left: 0;
	object-fit: cover;
	opacity: 1;
	position: absolute;
	top: 0;
	transition: filter 0.9s ease, transform 0.9s ease;
	width: 100%;
}

/* While music plays the scene softens into the background (scaled up a little
   so the blur doesn't pull in pale edges); paused, it comes back into focus. */
.nbjm-app .nbjm-now.is-playing .nbjm-now__backdrop .nbjm-now__scene {
	filter: blur(6px) brightness(0.8);
	transform: scale(1.05);
}

.nbjm-app .nbjm-now.has-scene .nbjm-now__backdrop img[data-nbjm="now-bg"] {
	visibility: hidden;
}

.nbjm-app .nbjm-now.has-scene .nbjm-now__backdrop::before {
	animation: none;
	display: none;
}

/* Darker toward the bottom, where the controls sit. */
.nbjm-app .nbjm-now__backdrop::after {
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.22) 40%, rgba(0, 0, 0, 0.5) 100%);
	content: "";
	inset: 0;
	position: absolute;
}

/*
 * Phones: the top and bottom edges ease into solid --nbjm-now-edge, so the
 * sheet meets the browser's bars (painted from the page background on iOS
 * Safari) without a seam. Short, multi-stop fades: a long straight one
 * shows as a line across the blurred cover.
 */
@media (max-width: 759px) {
	.nbjm-app .nbjm-now__backdrop::after {
		--nbjm-now-top: env(safe-area-inset-top, 0px);
		--nbjm-now-bottom: var(--nbjm-safe-bottom);
		background:
			linear-gradient(to bottom, var(--nbjm-now-edge-top) 0, var(--nbjm-now-edge-top) var(--nbjm-now-top), color-mix(in srgb, var(--nbjm-now-edge-top) 60%, transparent) calc(var(--nbjm-now-top) + 24px), color-mix(in srgb, var(--nbjm-now-edge-top) 25%, transparent) calc(var(--nbjm-now-top) + 52px), transparent calc(var(--nbjm-now-top) + 88px)),
			linear-gradient(to top, var(--nbjm-now-edge-bottom) 0, var(--nbjm-now-edge-bottom) var(--nbjm-now-bottom), color-mix(in srgb, var(--nbjm-now-edge-bottom) 60%, transparent) calc(var(--nbjm-now-bottom) + 24px), color-mix(in srgb, var(--nbjm-now-edge-bottom) 25%, transparent) calc(var(--nbjm-now-bottom) + 52px), transparent calc(var(--nbjm-now-bottom) + 88px)),
			linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.22) 40%, rgba(0, 0, 0, 0.5) 100%);
	}
}

/*
 * While the sheet is open the page behind it takes the edge color: iOS
 * Safari colors the status bar and its floating toolbar from the page
 * background, not from the dialog. JS copies the cover's color to
 * --nbjm-now-page-tint (the sheet's own tint lives on the dialog), or a
 * scene's bottom color to --nbjm-now-page-edge.
 */
html.nbjm-now-open {
	--nbjm-now-page: var(--nbjm-now-page-edge, color-mix(in srgb, color-mix(in srgb, var(--nbjm-now-page-tint, var(--nbj-primary)) 58%, #05070d) 62%, #000));
	background-color: var(--nbjm-now-page) !important;
}

html.nbjm-now-open body {
	background-color: var(--nbjm-now-page) !important;
}

@keyframes nbjm-now-drift {
	from { transform: translate(-4%, -3%) rotate(0deg) scale(1); }
	to { transform: translate(4%, 3%) rotate(8deg) scale(1.08); }
}

.nbjm-app .nbjm-now__sheet {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) var(--nbjm-safe-bottom) env(safe-area-inset-left, 0px);
	position: relative;
}

.nbjm-app .nbjm-now__header {
	align-items: center;
	cursor: grab;
	display: flex;
	flex: none;
	gap: 8px;
	justify-content: space-between;
	padding: 10px 12px 4px;
	touch-action: none;
	user-select: none;
}

/* The grab handle above the header on phones. */
.nbjm-app .nbjm-now__header::before {
	background: var(--nbjm-now-faint);
	border-radius: 999px;
	content: "";
	height: 4px;
	left: 50%;
	position: absolute;
	top: calc(env(safe-area-inset-top, 0px) + 5px);
	transform: translateX(-50%);
	width: 36px;
}

.nbjm-app .nbjm-now.is-dragging .nbjm-now__header {
	cursor: grabbing;
}

/* The context takes the room between close and the actions, centered in it. */
.nbjm-app .nbjm-now__header > .nbjm-now__context {
	flex: 1 1 auto;
	justify-content: center;
}

.nbjm-app .nbjm-now__actions {
	align-items: center;
	display: flex;
	gap: 2px;
}

/* Sleep timer: the moon, and the minutes left beside it once it's set. */
.nbjm-app .nbjm-now .nbjm-now__sleep {
	border-radius: 999px;
	gap: 4px;
	min-width: 40px;
	width: auto;
}

.nbjm-app .nbjm-now .nbjm-now__sleep.is-active {
	color: var(--nbjm-now-text);
}

.nbjm-app .nbjm-now__sleep-left {
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	padding-right: 4px;
}

.nbjm-app .nbjm-sleep-menu {
	min-width: 180px;
}

.nbjm-app .nbjm-sleep-menu [role="menuitemradio"] .nbjm-icon {
	visibility: hidden;
}

.nbjm-app .nbjm-sleep-menu [aria-checked="true"] .nbjm-icon {
	visibility: visible;
}

/* A timer is set: a small moon on the bar's artwork. */
.nbjm-app .nbjm-player.has-sleep .nbjm-player__art::after {
	background: var(--nbj-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23555' transform='translate(-0.5 5) scale(0.78)' d='M12.3 2a10 10 0 1 0 9.7 12.4 7.5 7.5 0 0 1-9.7-12.4z'/%3E%3Cpath fill='%23555' d='M15 1.5h6V3l-3.7 3H21v1.5h-6V6l3.7-3H15z'/%3E%3C/svg%3E") center / 12px no-repeat;
	border-radius: 50%;
	bottom: 3px;
	box-shadow: 0 1px 3px rgba(var(--nbjm-shade), 0.3);
	content: "";
	height: 18px;
	position: absolute;
	right: 3px;
	width: 18px;
}

.nbjm-app .nbjm-now__context {
	align-items: center;
	color: var(--nbjm-now-muted);
	display: inline-flex;
	font-size: 0.72rem;
	font-weight: 700;
	gap: 8px;
	letter-spacing: 0.08em;
	min-width: 0;
	overflow: hidden;
	text-transform: uppercase;
	white-space: nowrap;
}

.nbjm-app .nbjm-now__context > span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
}

.nbjm-app .nbjm-now .nbjm-icon-btn {
	color: var(--nbjm-now-muted);
	font-size: 1.25rem;
}

.nbjm-app .nbjm-now .nbjm-icon-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.12);
	color: var(--nbjm-now-text);
}

.nbjm-app .nbjm-now .nbjm-icon-btn:focus-visible,
.nbjm-app .nbjm-now .nbjm-play-btn:focus-visible,
.nbjm-app .nbjm-now .nbjm-range:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.nbjm-app .nbjm-now__title:focus {
	outline: none;
}

.nbjm-app .nbjm-now__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 24px 24px;
	scrollbar-color: var(--nbjm-now-faint) transparent;
	scrollbar-width: thin;
}

.nbjm-app .nbjm-now__stage {
	align-items: center;
	display: flex;
	flex: 1 0 auto;
	justify-content: center;
	padding: 16px 0 24px;
	touch-action: none;
	user-select: none;
}

.nbjm-app .nbjm-now__swipe {
	position: relative;
	width: min(100%, 46vh, 46dvh, 520px);
	will-change: transform;
}

.nbjm-app .nbjm-now__art {
	aspect-ratio: 1;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
	border-radius: 14px;
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
	overflow: hidden;
	position: relative;
	transform: scale(0.86);
	transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.6s ease;
}

/* Playing: the artwork grows to full size (with a little bounce) and lifts. */
.nbjm-app .nbjm-now.is-playing .nbjm-now__art {
	box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.2);
	transform: none;
}

.nbjm-app .nbjm-now__art img {
	-webkit-user-drag: none;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.nbjm-app .nbjm-now__art-fallback {
	align-items: center;
	color: var(--nbjm-now-muted);
	display: flex;
	font-size: 4rem;
	inset: 0;
	justify-content: center;
	position: absolute;
}

/* Live radio: a ring pulses out from the artwork while it's on air. */
.nbjm-app .nbjm-now__swipe::before {
	border-radius: 14px;
	content: "";
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
}

.nbjm-app .nbjm-now.is-live.is-playing .nbjm-now__swipe::before {
	animation: nbjm-now-live 2.4s ease-out infinite;
}

@keyframes nbjm-now-live {
	0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); opacity: 1; }
	100% { box-shadow: 0 0 0 28px rgba(255, 255, 255, 0); opacity: 1; }
}

.nbjm-app .nbjm-now__panel {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0 auto;
	width: min(100%, 520px);
}

.nbjm-app .nbjm-now__info {
	align-items: center;
	display: flex;
	gap: 4px;
}

.nbjm-app .nbjm-now__meta {
	flex: 1 1 auto;
	min-width: 0;
}

.nbjm-app .nbjm-now__title {
	color: var(--nbjm-now-text);
	font-family: var(--nbjm-font-heading);
	font-size: clamp(1.35rem, 1rem + 1.6vw, 1.9rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	overflow-wrap: anywhere;
}

.nbjm-app .nbjm-now__artist {
	color: var(--nbjm-now-muted);
	font-size: 1rem;
	margin: 4px 0 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-now .nbjm-fav[aria-pressed="true"] {
	color: var(--nbj-accent);
}

/* Seek bar: thicker, white, with a thumb that's easy to grab. */
.nbjm-app .nbjm-now__progress {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nbjm-app .nbjm-now .nbjm-range {
	height: 28px;
	min-width: 0;
	width: 100%;
}

.nbjm-app .nbjm-now .nbjm-range::-webkit-slider-runnable-track {
	background: linear-gradient(to right, #fff var(--nbjm-fill), var(--nbjm-now-faint) var(--nbjm-fill));
	height: 6px;
}

.nbjm-app .nbjm-now .nbjm-range::-moz-range-track {
	background: var(--nbjm-now-faint);
	height: 6px;
}

.nbjm-app .nbjm-now .nbjm-range::-moz-range-progress {
	background: #fff;
	height: 6px;
}

.nbjm-app .nbjm-now .nbjm-range::-webkit-slider-thumb {
	background: #fff;
	border: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	height: 18px;
	margin-top: -6px;
	transform: none;
	width: 18px;
}

.nbjm-app .nbjm-now .nbjm-range::-moz-range-thumb {
	background: #fff;
	border: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	height: 18px;
	transform: none;
	width: 18px;
}

.nbjm-app .nbjm-now__times {
	color: var(--nbjm-now-muted);
	display: flex;
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	justify-content: space-between;
}

.nbjm-app .nbjm-now__controls {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding: 0 4px;
}

.nbjm-app .nbjm-now__controls .nbjm-icon-btn {
	height: 48px;
	width: 48px;
}

.nbjm-app .nbjm-now__controls .nbjm-now__skip {
	color: var(--nbjm-now-text);
	font-size: 1.9rem;
	height: 60px;
	width: 60px;
}

.nbjm-app .nbjm-now .nbjm-toggle[aria-pressed="true"],
.nbjm-app .nbjm-now .nbjm-toggle.is-active {
	color: var(--nbjm-now-text);
}

.nbjm-app .nbjm-now .nbjm-play-btn {
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
	color: color-mix(in srgb, var(--nbjm-now-tint) 40%, #0b1020);
	font-size: 2rem;
	height: 76px;
	margin: 0;
	width: 76px;
}

.nbjm-app .nbjm-now .nbjm-play-btn:hover {
	background: rgba(255, 255, 255, 0.88);
}

.nbjm-app .nbjm-now .nbjm-spinner {
	border-color: rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	inset: -5px;
}

.nbjm-app .nbjm-now.is-loading .nbjm-spinner {
	display: block;
}

.nbjm-app .nbjm-now__volume {
	align-items: center;
	display: flex;
	gap: 6px;
}

/*
 * Live radio: no seeking or skipping, just play/stop and what's been on air.
 * They leave the layout entirely, so the lists below get the room.
 */
.nbjm-app .nbjm-now.is-live .nbjm-now__progress,
.nbjm-app .nbjm-now.is-live .nbjm-now__controls .nbjm-icon-btn {
	display: none;
}

.nbjm-app .nbjm-now.is-live .nbjm-now__controls {
	justify-content: center;
}

.nbjm-app .nbjm-now__label {
	color: var(--nbjm-now-muted);
	font-family: inherit;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 8px 0 6px;
	text-transform: uppercase;
}

.nbjm-app .nbjm-now__history[hidden] {
	display: none;
}

.nbjm-app .nbjm-now__history-list {
	background: rgba(0, 0, 0, 0.18);
	border-radius: var(--nbjm-radius-sm);
	padding: 4px;
}

.nbjm-app .nbjm-now__song {
	align-items: center;
	border-radius: calc(var(--nbjm-radius-sm) - 2px);
	display: grid;
	gap: 12px;
	grid-template-columns: 44px minmax(0, 1fr) auto auto;
	min-height: 56px;
	padding: 6px 4px 6px 6px;
}

.nbjm-app .nbjm-now__song:not([data-track-id]) {
	grid-template-columns: 44px minmax(0, 1fr) auto;
}

.nbjm-app .nbjm-now__song-art {
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	color: var(--nbjm-now-muted);
	display: flex;
	height: 44px;
	justify-content: center;
	overflow: hidden;
	position: relative;
	width: 44px;
}

.nbjm-app .nbjm-now__song-art img {
	height: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
	width: 100%;
}

.nbjm-app .nbjm-now__song-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nbjm-app .nbjm-now__song-title,
.nbjm-app .nbjm-now__song-artist {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbjm-app .nbjm-now__song-title {
	font-weight: 700;
}

.nbjm-app .nbjm-now__song-artist,
.nbjm-app .nbjm-now__song-time {
	color: var(--nbjm-now-muted);
	font-size: 0.82rem;
}

.nbjm-app .nbjm-now__song-time {
	white-space: nowrap;
}

.nbjm-app .nbjm-now__song .nbjm-icon-btn {
	font-size: 1.1rem;
}

/* Phones and touch screens: the hardware buttons set the volume. */
@media (max-width: 759px), (pointer: coarse) {
	.nbjm-app .nbjm-now__volume {
		display: none;
	}
}

@media (min-width: 760px) {
	.nbjm-app .nbjm-now__header::before {
		display: none;
	}

	.nbjm-app .nbjm-now__header {
		cursor: default;
		padding: 16px 20px 4px;
	}
}

/* Wide screens: the artwork on the left, everything else beside it. */
@media (min-width: 900px) {
	.nbjm-app .nbjm-now__body {
		align-items: center;
		flex-direction: row;
		gap: clamp(32px, 6vw, 88px);
		justify-content: center;
		padding: 0 48px 48px;
	}

	.nbjm-app .nbjm-now__stage {
		flex: 0 1 auto;
		padding: 0;
	}

	.nbjm-app .nbjm-now__swipe {
		width: min(42vw, 68vh, 560px);
	}

	/*
	 * No scrolling: the panel is as tall as the screen, and "Recently played"
	 * takes whatever height is left, showing only the rows that fit whole.
	 * Only a screen too short for even one row lets the panel scroll. The
	 * padding keeps focus outlines inside the scroll box.
	 */
	.nbjm-app .nbjm-now__body {
		overflow: hidden;
	}

	.nbjm-app .nbjm-now__panel {
		flex: 0 1 420px;
		height: 100%;
		justify-content: safe center;
		margin: 0 -8px;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 4px 8px;
		scrollbar-color: var(--nbjm-now-faint) transparent;
		scrollbar-width: thin;
	}

	.nbjm-app .nbjm-now__panel > * {
		flex: none;
	}

	.nbjm-app .nbjm-now__panel > [data-nbjm="now-history"]:not([hidden]) {
		display: flex;
		flex: 0 1 auto;
		flex-direction: column;
		min-height: 0;
	}

	/*
	 * The box asks for room for every row (--nbjm-now-rows, set by the app)
	 * and shrinks to what's left; the list inside snaps down to whole 56px
	 * rows, so no empty strip shows under the last one. Rows that don't fit
	 * (or grow taller than 56px) wrap into a clipped second column.
	 */
	.nbjm-app .nbjm-now__panel > [data-nbjm="now-history"] .nbjm-now__history-fit {
		container-type: size;
		flex: 0 1 calc(var(--nbjm-now-rows, 1) * 56px + 8px);
		min-height: 64px;
	}

	.nbjm-app .nbjm-now__panel > [data-nbjm="now-history"] .nbjm-now__history-list {
		column-gap: 8px;
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
		height: 100%;
		height: calc(round(down, 100cqh - 8px, 56px) + 8px);
		overflow: hidden;
	}

	.nbjm-app .nbjm-now__panel > [data-nbjm="now-history"] .nbjm-now__song {
		width: 100%;
	}
}

/* Short wide screens (laptops): tighter spacing, so a row of history still fits. */
@media (min-width: 900px) and (max-height: 760px) {
	.nbjm-app .nbjm-now__panel {
		gap: 8px;
	}

	.nbjm-app .nbjm-now__label {
		margin-top: 4px;
	}
}

@media (forced-colors: active) {
	.nbjm-app .nbjm-now {
		border: 1px solid CanvasText;
	}

	.nbjm-app .nbjm-now__backdrop,
	.nbjm-app .nbjm-album__scene {
		display: none;
	}
}

/* ------------------------------------------------------------------ */
/* Tab bar (phones)                                                   */
/* ------------------------------------------------------------------ */

.nbjm-app .nbjm-tabbar {
	display: none;
}

@media (max-width: 759px) {
	.nbjm-app .nbjm-tabbar {
		background: var(--nbj-background);
		bottom: 0;
		display: block;
		left: 0;
		padding: 0 env(safe-area-inset-right, 0px) var(--nbjm-safe-bottom) env(safe-area-inset-left, 0px);
		position: fixed;
		right: 0;
		z-index: 99989; /* Just under the player card. */
	}

	/* Page content fades out behind the player card and the tabs. */
	.nbjm-app .nbjm-tabbar::before {
		background: linear-gradient(to bottom, color-mix(in srgb, var(--nbj-background) 0%, transparent), var(--nbj-background));
		bottom: 100%;
		content: "";
		height: calc(var(--nbjm-player-height) + 20px);
		left: 0;
		pointer-events: none;
		position: absolute;
		right: 0;
	}

	.nbjm-app .nbjm-tabbar__list {
		display: grid;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.nbjm-app .nbjm-tabbar__item {
		align-items: center;
		color: var(--nbjm-muted);
		display: flex;
		flex-direction: column;
		font-size: 0.7rem;
		font-weight: 600;
		gap: 4px;
		height: var(--nbjm-tabbar-height);
		justify-content: center;
		-webkit-tap-highlight-color: transparent;
		text-decoration: none;
	}

	.nbjm-app .nbjm-tabbar__item:hover {
		color: var(--nbj-primary);
	}

	.nbjm-app .nbjm-tabbar__item[aria-current] {
		color: var(--nbjm-accent-text);
		font-weight: 800;
	}

	.nbjm-app .nbjm-tabbar__item .nbjm-icon {
		height: 24px;
		transition: transform 0.15s ease;
		width: 24px;
	}

	.nbjm-app .nbjm-tabbar__item:active .nbjm-icon {
		transform: scale(0.9);
	}

	.nbjm-app .nbjm-tabbar__item:focus-visible {
		border-radius: 12px;
		outline-offset: -4px;
	}

	.nbjm-app .nbjm-tabbar__label {
		max-width: 100%;
		overflow: hidden;
		padding: 0 2px;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* "Get notified" stands in for Live Radio until the visitor signs up. */
	html:not(.nbjm-subscribed) .nbjm-app .nbjm-tabbar--signup .nbjm-tabbar__slot--radio,
	html.nbjm-subscribed .nbjm-app .nbjm-tabbar__slot--notify {
		display: none;
	}

	/* Its bell rings three times after the page loads, then rests (the tab
	   bar stays put across router navigations, so it doesn't ring again). */
	.nbjm-app .nbjm-tabbar__slot--notify .nbjm-icon {
		animation: nbjm-bell-ring 4s ease-in-out 1.5s 3;
		transform-origin: 50% 10%;
	}

	/* Scrolling down the library slides the tabs away with the search bar
	   (see _initSearchReveal); the player card drops into their place. */
	.nbjm-app .nbjm-tabbar,
	.nbjm-app .nbjm-player {
		transition: transform 0.25s ease;
	}

	html.nbjm-bars-hidden .nbjm-app .nbjm-tabbar {
		transform: translateY(100%);
	}

	html.nbjm-bars-hidden .nbjm-app .nbjm-player {
		transform: translateY(calc(var(--nbjm-tabbar-height) - 8px));
	}

	/* The on-screen keyboard doesn't resize the layout viewport on iOS, so
	   fixed bars would float over the page; step aside while typing. */
	html.nbjm-typing .nbjm-app .nbjm-player,
	html.nbjm-typing .nbjm-app .nbjm-tabbar {
		display: none;
	}
}

/* ------------------------------------------------------------------ */
/* Motion                                                             */
/* ------------------------------------------------------------------ */

@keyframes nbjm-highlight {
	0%,
	40% {
		background: color-mix(in srgb, var(--nbj-accent) 28%, var(--nbj-surface));
		box-shadow: inset 4px 0 0 var(--nbj-accent);
	}
}

@keyframes nbjm-eq {
	0%, 100% { transform: scaleY(0.3); }
	50% { transform: scaleY(1); }
}

@keyframes nbjm-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

@keyframes nbjm-spin {
	to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------ */
/* Profile avatar and drawer (profile-drawer.php)                     */
/* ------------------------------------------------------------------ */

/*
 * The visitor's initial on their color (keys match NBJProfile.COLORS).
 * Every color keeps white text at 4.5:1 or better. Themes can restyle a
 * color with .nbjm-app [data-color="teal"] { --nbjm-avatar-bg: … }.
 */
.nbjm-app [data-color] {
	--nbjm-avatar-bg: #1f7a45;
}

.nbjm-app [data-color="teal"] { --nbjm-avatar-bg: #0f7173; }
.nbjm-app [data-color="blue"] { --nbjm-avatar-bg: #2563b8; }
.nbjm-app [data-color="purple"] { --nbjm-avatar-bg: #6d45c2; }
.nbjm-app [data-color="pink"] { --nbjm-avatar-bg: #b8346f; }
.nbjm-app [data-color="red"] { --nbjm-avatar-bg: #c0322b; }
.nbjm-app [data-color="orange"] { --nbjm-avatar-bg: #b4510f; }
.nbjm-app [data-color="gold"] { --nbjm-avatar-bg: #8a6100; }

.nbjm-app .nbjm-avatar {
	align-items: center;
	background: var(--nbjm-avatar-bg, var(--nbj-primary));
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	flex: none;
	font-size: 1.05rem;
	font-weight: 700;
	height: 40px;
	justify-content: center;
	line-height: 1;
	overflow: hidden;
	user-select: none;
	width: 40px;
}

.nbjm-app .nbjm-avatar .nbjm-avatar__icon {
	height: 60%;
	width: 60%;
}

.nbjm-app .nbjm-avatar.has-initial .nbjm-avatar__icon,
.nbjm-app .nbjm-avatar:not(.has-initial) .nbjm-avatar__initial {
	display: none;
}

.nbjm-app .nbjm-topbar__avatar {
	box-shadow: 0 0 0 3px var(--nbj-background), 0 0 0 4px var(--nbjm-border);
	cursor: pointer;
	margin-left: 4px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nbjm-app .nbjm-topbar__avatar:hover {
	box-shadow: 0 0 0 3px var(--nbj-background), 0 0 0 5px color-mix(in srgb, var(--nbjm-avatar-bg) 45%, transparent);
	transform: scale(1.05);
}

.nbjm-app .nbjm-topbar__avatar:focus-visible {
	outline: 2px solid var(--nbj-accent);
	outline-offset: 4px;
}

.nbjm-app[data-view="search"] .nbjm-topbar__avatar {
	display: none;
}

.nbjm-app .nbjm-avatar--large {
	font-size: 1.6rem;
	height: 64px;
	transition: background-color 0.2s ease;
	width: 64px;
}

.nbjm-app .nbjm-drawer > .nbjm-profile {
	gap: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 20px 18px calc(18px + var(--nbjm-safe-bottom));
}

.nbjm-app .nbjm-profile__header {
	align-items: center;
	border-bottom: 1px solid var(--nbjm-border);
	display: flex;
	gap: 14px;
	padding-bottom: 18px;
}

.nbjm-app .nbjm-profile__title {
	color: var(--nbj-primary);
	flex: 1 1 auto;
	font-family: var(--nbjm-font-heading);
	font-size: 1.4rem;
	line-height: 1.2;
	margin: 0;
	min-width: 0;
	overflow-wrap: break-word; /* At spaces; mid-word only for a long name. */
}

/* "Good afternoon," small above the name. */
.nbjm-app .nbjm-profile__greeting {
	color: var(--nbjm-muted);
	display: block;
	font-size: 0.95rem;
	margin-bottom: 2px;
}

.nbjm-app .nbjm-profile__name {
	display: block;
}

.nbjm-app .nbjm-profile__header .nbjm-drawer__close {
	align-self: flex-start;
}

.nbjm-app .nbjm-profile__form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 0;
}

.nbjm-app .nbjm-profile__label {
	color: var(--nbjm-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 0;
	text-transform: uppercase;
}

.nbjm-app .nbjm-profile__input {
	flex: none;
	font-family: inherit;
	font-size: 1rem; /* 16px: no zoom on iOS. */
	letter-spacing: normal;
	min-height: 44px;
	text-transform: none;
}

.nbjm-app .nbjm-profile__colors {
	border: 0;
	margin: 10px 0 0;
	min-width: 0;
	padding: 0;
}

.nbjm-app .nbjm-profile__colors legend {
	margin: 0 0 10px; /* Themes may pull legends outward. */
}

/* One row of eight, up to 44px each (two rows of four on phones). */
.nbjm-app .nbjm-profile__swatches {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(8, minmax(0, 44px));
	justify-content: space-between;
	padding: 5px; /* Room for the selected ring. */
}

.nbjm-app .nbjm-swatch {
	align-items: center;
	background: var(--nbjm-avatar-bg);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	aspect-ratio: 1;
	display: inline-flex;
	justify-content: center;
	margin: 0; /* Themes space out labels. */
	position: relative;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	width: 100%;
}

.nbjm-app .nbjm-swatch:hover {
	transform: scale(1.08);
}

.nbjm-app .nbjm-swatch__input {
	appearance: none;
	border-radius: 50%;
	cursor: pointer;
	inset: 0;
	margin: 0;
	position: absolute;
}

.nbjm-app .nbjm-swatch__input:focus-visible {
	outline: 2px solid var(--nbj-accent);
	outline-offset: 3px;
}

.nbjm-app .nbjm-swatch__check {
	height: 55%;
	opacity: 0;
	pointer-events: none;
	transform: scale(0.6);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.nbjm-app .nbjm-swatch:has(:checked) {
	box-shadow: 0 0 0 3px var(--nbj-surface), 0 0 0 5px var(--nbjm-avatar-bg);
	transform: scale(1.08);
}

.nbjm-app .nbjm-swatch:has(:checked) .nbjm-swatch__check {
	opacity: 1;
	transform: none;
}

.nbjm-app .nbjm-profile__hint {
	color: var(--nbjm-muted);
	font-size: 0.8rem;
	margin: 2px 0 0;
}

/* Appearance is this device only: set apart from the synced name and color. */
.nbjm-app .nbjm-profile__colors + .nbjm-profile__hint {
	border-bottom: 1px solid var(--nbjm-border);
	padding-bottom: 16px;
}

.nbjm-app .nbjm-profile__appearance {
	margin-top: 8px;
}

.nbjm-app .nbjm-segmented + .nbjm-segmented {
	margin-top: 8px;
}

.nbjm-app .nbjm-profile__menu {
	border-top: 1px solid var(--nbjm-border);
	list-style: none;
	margin: 0;
	padding: 10px 0 0;
}

.nbjm-app .nbjm-profile__item {
	align-items: center;
	border-radius: var(--nbjm-radius-sm);
	color: var(--nbj-primary);
	display: flex;
	font-size: 1.05rem;
	font-weight: 600;
	gap: 14px;
	min-height: 52px;
	padding: 0 10px;
	text-decoration: none;
}

/* Send feedback is a button (it opens a sheet); look like the Settings link. */
.nbjm-app button.nbjm-profile__item {
	appearance: none;
	background: none;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	line-height: inherit;
	text-align: start;
	width: 100%;
}

.nbjm-app .nbjm-profile__item:hover,
.nbjm-app .nbjm-profile__item:focus-visible {
	background: var(--nbjm-hover);
	color: var(--nbjm-accent-text);
}

.nbjm-app .nbjm-profile__item .nbjm-icon {
	height: 24px;
	width: 24px;
}

/* Appearance: Auto · Light · Dark. */
.nbjm-app .nbjm-segmented {
	background: var(--nbj-soft);
	border-radius: 999px;
	display: flex;
	gap: 2px;
	padding: 4px;
}

.nbjm-app .nbjm-segmented__option {
	align-items: center;
	border-radius: 999px;
	color: var(--nbjm-muted);
	cursor: pointer;
	display: flex;
	flex: 1 1 0;
	font-size: 0.9rem;
	font-weight: 600;
	gap: 6px;
	justify-content: center;
	line-height: 1;
	margin: 0; /* Themes space out labels. */
	min-height: 40px;
	position: relative;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nbjm-app .nbjm-segmented__option .nbjm-icon {
	display: block;
	flex: none;
	height: 18px;
	width: 18px;
}

.nbjm-app .nbjm-segmented__input {
	appearance: none;
	border-radius: 999px;
	cursor: pointer;
	inset: 0;
	margin: 0;
	position: absolute;
}

.nbjm-app .nbjm-segmented__input:focus-visible {
	outline: 2px solid var(--nbj-accent);
	outline-offset: 1px;
}

.nbjm-app .nbjm-segmented__option:hover {
	color: var(--nbj-primary);
}

.nbjm-app .nbjm-segmented__option:has(:checked) {
	background: var(--nbj-surface);
	box-shadow: 0 1px 4px rgba(var(--nbjm-shade), 0.15);
	color: var(--nbj-primary);
}

/* Phones: a full-height panel from the left (like Spotify), not a bottom sheet. */
@media (max-width: 759px) {
	.nbjm-app .nbjm-drawer--profile {
		height: 100%;
		inset: 0 auto 0 0;
		max-height: none;
		width: min(340px, 86vw);
	}

	.nbjm-app .nbjm-drawer--profile[open] {
		animation-name: nbjm-slide-in-left;
	}

	/* Eight in a row would be too small to tap in this narrow panel. */
	.nbjm-app .nbjm-profile__swatches {
		gap: 12px 16px;
		grid-template-columns: repeat(4, 44px);
		justify-content: start;
	}

	.nbjm-app .nbjm-drawer > .nbjm-profile {
		border-radius: 0 var(--nbj-radius) var(--nbj-radius) 0;
		padding-top: calc(20px + env(safe-area-inset-top, 0px));
	}
}

@keyframes nbjm-slide-in {
	from { transform: translateX(24px); opacity: 0; }
	to { transform: none; opacity: 1; }
}

@keyframes nbjm-slide-in-left {
	from { transform: translateX(-100%); }
	to { transform: none; }
}

@keyframes nbjm-slide-up {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: none; opacity: 1; }
}

/* ------------------------------------------------------------------ */
/* Homepage ([nbj_music_home])                                        */
/* ------------------------------------------------------------------ */

/* The theme paints the hero background; the app supplies the content. */
.nbjm-app.nbjm-app--home {
	max-width: none;
}

.nbjm-app .nbjm-home__hero {
	padding: clamp(48px, 10vh, 112px) 16px clamp(40px, 8vh, 88px);
}

.nbjm-app .nbjm-home__hero-inner {
	margin: 0 auto;
	max-width: 760px;
}

.nbjm-app .nbjm-home__card {
	container: nbjm-main / inline-size;
}

/* Frosted glass, so the watercolor behind it shows through. */
.nbjm-app .nbjm-radio--hero {
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	background: color-mix(in srgb, var(--nbj-surface) 86%, transparent);
	border: 1px solid color-mix(in srgb, var(--nbj-surface) 70%, transparent);
	box-shadow: 0 24px 60px rgba(var(--nbjm-shade), 0.18);
	text-align: left;
}

/* Phones: a thumbnail beside the song, so Listen Live stays above the fold.
   The body's children join the card grid so the buttons can use its full
   width instead of the narrow column beside the thumbnail. */
@container nbjm-main (max-width: 599px) {
	.nbjm-app .nbjm-radio--hero {
		align-items: start;
		gap: 0 16px;
		grid-template-columns: 88px minmax(0, 1fr);
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__body {
		display: contents;
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__art {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__body > * {
		grid-column: 2;
		min-width: 0;
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__body > .nbjm-radio__actions {
		grid-column: 1 / -1;
		margin-top: 16px;
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__actions > .nbjm-btn,
	.nbjm-app .nbjm-radio--hero .nbjm-radio__track {
		flex: 1 1 auto;
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__track .nbjm-btn,
	.nbjm-app .nbjm-radio--hero .nbjm-radio__track .nbjm-skel--pill {
		flex: 1 1 auto;
		width: auto;
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__art .nbjm-live-badge {
		font-size: 0.6rem;
		right: 4px;
		top: 4px;
	}
}

@container nbjm-main (min-width: 600px) {
	.nbjm-app .nbjm-radio--hero {
		gap: 28px;
		grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
	}
}

/* The page already introduces the station, so its name is a quiet label here. */
.nbjm-app .nbjm-radio--hero .nbjm-radio__title {
	color: var(--nbjm-muted);
	font-family: inherit;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.nbjm-app .nbjm-radio--hero .nbjm-radio__on-air {
	margin-top: 8px;
}

/* Artwork that follows the song on air: the icon shows only without an image. */
.nbjm-app .nbjm-radio__art img:not([hidden]) + .nbjm-radio__art-fallback {
	display: none;
}

/*
 * Placeholders while the hero waits for its first now-playing answer
 * (.is-pending on the card) and while the song's cover loads (.is-loading
 * on the art). Each bar is one line box of the text it stands in for, so
 * nothing moves when the real text takes its place.
 */
.nbjm-app .nbjm-skel {
	--nbjm-skel-base: color-mix(in srgb, var(--nbj-primary) 9%, transparent);
	--nbjm-skel-shine: color-mix(in srgb, var(--nbj-surface) 55%, transparent);
	animation: nbjm-skel 1.4s ease-in-out infinite;
	background: linear-gradient(100deg, var(--nbjm-skel-base) 40%, var(--nbjm-skel-shine) 50%, var(--nbjm-skel-base) 60%) 0 0 / 250% 100% var(--nbjm-skel-base);
	background-clip: padding-box;
	border: 0 solid transparent;
	border-radius: 999px;
	display: block;
	flex: none;
}

.nbjm-app .nbjm-skel-group {
	display: contents;
}

/* Same font and line height as the eyebrow, title and album lines. */
.nbjm-app .nbjm-skel--eyebrow {
	border-block-width: 0.3em;
	font-size: 0.75rem;
	height: 1.5em;
	height: 1lh;
	width: 9em;
}

.nbjm-app .nbjm-skel--title {
	border-block-width: 0.22em;
	font-size: clamp(1.1rem, 3cqi, 1.35rem);
	height: 1.3em;
	line-height: 1.3;
	width: min(16em, 85%);
}

.nbjm-app .nbjm-skel--sub {
	border-block-width: 0.25em;
	font-size: calc(clamp(1.1rem, 3cqi, 1.35rem) * 0.8);
	height: 1.3em;
	line-height: 1.3;
	/* The album sits right under the title (one element), not a gap away. */
	margin-top: -4px;
	width: min(9em, 55%);
}

.nbjm-app .nbjm-skel--icon {
	border-radius: 50%;
	height: 40px;
	width: 40px;
}

.nbjm-app .nbjm-skel--pill {
	height: 40px;
	width: 13.5em;
	max-width: 100%;
}

/* The real buttons stay out until the song on air is known. */
.nbjm-app .nbjm-radio.is-pending .nbjm-radio__track > :not(.nbjm-skel) {
	display: none;
}

.nbjm-app .nbjm-radio.is-pending .nbjm-radio__art::after,
.nbjm-app .nbjm-radio__art.is-loading::after {
	animation: nbjm-skel 1.4s ease-in-out infinite;
	background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%) 0 0 / 250% 100%;
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.nbjm-app .nbjm-radio--hero .nbjm-radio__art img {
	transition: opacity 0.35s ease;
}

/* Above the shimmer. */
.nbjm-app .nbjm-radio--hero .nbjm-radio__art .nbjm-live-badge {
	z-index: 1;
}

.nbjm-app .nbjm-radio.is-pending .nbjm-radio__art img,
.nbjm-app .nbjm-radio__art.is-loading img {
	opacity: 0;
}

.nbjm-app .nbjm-radio.is-pending .nbjm-radio__art-fallback {
	display: none;
}

@keyframes nbjm-skel {
	from {
		background-position: 100% 0;
	}

	to {
		background-position: 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nbjm-app .nbjm-skel,
	.nbjm-app .nbjm-radio.is-pending .nbjm-radio__art::after,
	.nbjm-app .nbjm-radio__art.is-loading::after {
		animation: none;
	}

	.nbjm-app .nbjm-radio--hero .nbjm-radio__art img {
		transition: none;
	}
}

.nbjm-app .nbjm-home__cta {
	margin: 20px 0 0;
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* Client-side navigation (nbj-music-router.js)                       */
/* ------------------------------------------------------------------ */

html.nbjm-navigating {
	cursor: progress;
}

/* Thin bar at the top while the next page loads (shown at once: the router
   skips it when the page is already kept). */
.nbjm-app .nbjm-route-progress {
	background: var(--nbj-accent);
	height: 3px;
	left: 0;
	opacity: 0;
	pointer-events: none;
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	transition: opacity 0.2s ease, width 0.3s ease;
	width: 0;
	z-index: 100000;
}

html.nbjm-navigating .nbjm-app .nbjm-route-progress {
	opacity: 1;
	transition: opacity 0.1s ease, width 2.5s cubic-bezier(0.1, 0.7, 0.2, 1);
	width: 80%;
}

/* ------------------------------------------------------------------ */
/* Glass (profile drawer → Appearance; html[data-nbjm-glass="on"])     */
/* ------------------------------------------------------------------ */

/*
 * Only the chrome that floats over the page turns translucent: the player,
 * the tab bar, the stuck search box, the song menu, the drawers and the
 * toast. Lists and cards stay solid so they stay easy to read. Without
 * backdrop-filter, or when the visitor asks for less transparency, the
 * tokens fall back to the solid look.
 */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
	:root[data-nbjm-glass="on"] .nbjm-app {
		--nbjm-glass-bg: color-mix(in srgb, var(--nbj-surface) 45%, transparent);
		--nbjm-glass-page: color-mix(in srgb, var(--nbj-background) 50%, transparent);
		--nbjm-glass-inverse: color-mix(in srgb, var(--nbjm-inverse-bg) 70%, transparent);
		--nbjm-glass-blur: blur(20px) saturate(200%) brightness(1.06);
		--nbjm-glass-border: rgba(255, 255, 255, 0.7);
		--nbjm-glass-edge: inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
		/* Light catching the top-left of the pane. */
		--nbjm-glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.18) 100%);
		/* A soft wash of the brand colors behind the page, for the glass to bend. */
		--nbjm-glass-wash:
			radial-gradient(60vmax 50vmax at 0% 0%, color-mix(in srgb, var(--nbj-accent) 22%, transparent), transparent 70%),
			radial-gradient(55vmax 45vmax at 100% 30%, color-mix(in srgb, var(--nbj-blue) 20%, transparent), transparent 70%),
			radial-gradient(60vmax 50vmax at 30% 100%, color-mix(in srgb, #b56cff 14%, transparent), transparent 70%);
	}

	:root[data-nbjm-glass="on"][data-nbjm-theme="dark"] .nbjm-app {
		--nbjm-glass-bg: color-mix(in srgb, var(--nbj-surface) 50%, transparent);
		--nbjm-glass-page: color-mix(in srgb, var(--nbj-background) 55%, transparent);
		--nbjm-glass-blur: blur(20px) saturate(180%);
		--nbjm-glass-border: rgba(255, 255, 255, 0.16);
		--nbjm-glass-edge: inset 0 1px 1px rgba(255, 255, 255, 0.28), inset 0 -1px 1px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
		--nbjm-glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.05) 100%);
	}

	@media (prefers-color-scheme: dark) {
		:root[data-nbjm-glass="on"]:not([data-nbjm-theme="light"]) .nbjm-app {
			--nbjm-glass-bg: color-mix(in srgb, var(--nbj-surface) 50%, transparent);
			--nbjm-glass-page: color-mix(in srgb, var(--nbj-background) 55%, transparent);
			--nbjm-glass-blur: blur(20px) saturate(180%);
			--nbjm-glass-border: rgba(255, 255, 255, 0.16);
			--nbjm-glass-edge: inset 0 1px 1px rgba(255, 255, 255, 0.28), inset 0 -1px 1px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
			--nbjm-glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.05) 100%);
		}
	}

	@media (prefers-reduced-transparency: reduce) {
		:root[data-nbjm-glass="on"] .nbjm-app {
			--nbjm-glass-bg: var(--nbj-surface);
			--nbjm-glass-page: var(--nbj-background);
			--nbjm-glass-inverse: var(--nbjm-inverse-bg);
			--nbjm-glass-blur: none;
			--nbjm-glass-sheen: none;
		}
	}

	/*
	 * The wash sits behind everything (fixed, so it never scrolls away), from
	 * the one app root that holds the player so a page with two never doubles it.
	 */
	:root[data-nbjm-glass="on"] .nbjm-app:has(.nbjm-player)::before {
		background: var(--nbjm-glass-wash);
		content: "";
		inset: 0;
		pointer-events: none;
		position: fixed;
		z-index: -1;
	}

	:root[data-nbjm-glass="on"] .nbjm-app :is(.nbjm-player, .nbjm-menu, .nbjm-drawer > .nbjm-queue, .nbjm-topbar.is-stuck .nbjm-search__input) {
		-webkit-backdrop-filter: var(--nbjm-glass-blur);
		backdrop-filter: var(--nbjm-glass-blur);
		background: var(--nbjm-glass-sheen), var(--nbjm-glass-bg);
		border-color: var(--nbjm-glass-border);
	}

	:root[data-nbjm-glass="on"] .nbjm-app .nbjm-player {
		box-shadow: var(--nbjm-glass-edge), 0 -10px 30px rgba(var(--nbjm-shade), 0.1);
	}

	/*
	 * Wider screens: the player floats as a pill above the page edge. The
	 * body's bottom padding grows by the same gap so nothing hides under it.
	 */
	@media (min-width: 760px) {
		:root[data-nbjm-glass="on"] body.nbjm-has-player {
			padding-bottom: calc(var(--nbjm-player-height, 88px) + 32px + env(safe-area-inset-bottom, 0px));
		}

		:root[data-nbjm-glass="on"] .nbjm-app .nbjm-player {
			border: 1px solid var(--nbjm-glass-border);
			border-radius: 28px;
			bottom: calc(12px + var(--nbjm-safe-bottom));
			box-shadow: var(--nbjm-glass-edge), 0 18px 50px rgba(var(--nbjm-shade), 0.18), 0 2px 8px rgba(var(--nbjm-shade), 0.08);
			left: max(16px, env(safe-area-inset-left));
			padding-bottom: 10px;
			right: max(16px, env(safe-area-inset-right));
		}

		:root[data-nbjm-glass="on"] .nbjm-app .nbjm-toast {
			bottom: calc(var(--nbjm-player-height) + var(--nbjm-safe-bottom) + 28px);
		}
	}

	:root[data-nbjm-glass="on"] .nbjm-app .nbjm-menu {
		border-radius: 18px;
		box-shadow: var(--nbjm-glass-edge), 0 16px 40px rgba(var(--nbjm-shade), 0.2);
	}

	:root[data-nbjm-glass="on"] .nbjm-app .nbjm-drawer > .nbjm-queue {
		box-shadow: var(--nbjm-glass-edge), var(--nbjm-shadow);
	}

	:root[data-nbjm-glass="on"] .nbjm-app .nbjm-drawer::backdrop {
		-webkit-backdrop-filter: blur(6px);
		backdrop-filter: blur(6px);
		background: rgba(var(--nbjm-shade), 0.2);
	}

	/* Stuck search: the box floats on its own, the page shows around it. */
	:root[data-nbjm-glass="on"] .nbjm-app .nbjm-topbar.is-stuck {
		border-image: none;
	}

	:root[data-nbjm-glass="on"] .nbjm-app .nbjm-topbar.is-stuck .nbjm-search__input {
		box-shadow: var(--nbjm-glass-edge), 0 6px 20px rgba(var(--nbjm-shade), 0.12);
	}

	:root[data-nbjm-glass="on"] .nbjm-app .nbjm-toast {
		-webkit-backdrop-filter: var(--nbjm-glass-blur);
		backdrop-filter: var(--nbjm-glass-blur);
		background: var(--nbjm-glass-inverse);
	}

	@media (max-width: 759px) {
		:root[data-nbjm-glass="on"] .nbjm-app .nbjm-player {
			border-radius: 18px;
			box-shadow: var(--nbjm-glass-edge), 0 8px 24px rgba(var(--nbjm-shade), 0.18);
		}

		:root[data-nbjm-glass="on"] .nbjm-app .nbjm-tabbar {
			-webkit-backdrop-filter: var(--nbjm-glass-blur);
			backdrop-filter: var(--nbjm-glass-blur);
			background: var(--nbjm-glass-page);
			box-shadow: inset 0 1px 0 var(--nbjm-glass-border);
		}

		/* No fade: the page shows through the player card and the tabs. */
		:root[data-nbjm-glass="on"] .nbjm-app .nbjm-tabbar::before {
			display: none;
		}
	}
}

/* The player bar stays put while the page crossfades behind it. */
.nbjm-app .nbjm-player {
	view-transition-name: nbjm-player;
}

.nbjm-app .nbjm-tabbar {
	view-transition-name: nbjm-tabbar;
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: 0.2s;
}

/*
 * Opening or closing Now Playing from the player bar (html.nbjm-morphing,
 * see _morphNow): the artwork flies between the bar and the sheet while
 * the sheet rises or sinks around it. The bar and tabs join the page's
 * crossfade so they don't draw over the sheet.
 */
html.nbjm-morphing .nbjm-app :is(.nbjm-player, .nbjm-tabbar) {
	view-transition-name: none;
}

html.nbjm-morphing .nbjm-app .nbjm-now {
	animation: none;
	transition: none;
}

html.nbjm-morphing .nbjm-app .nbjm-now[open] {
	view-transition-name: nbjm-now;
}

html.nbjm-morphing::view-transition-old(root),
html.nbjm-morphing::view-transition-new(root) {
	animation-duration: 0.3s;
}

::view-transition-group(nbjm-art) {
	animation-duration: 0.34s;
	animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
	z-index: 2; /* Above the sheet, which comes later in the opening's capture order. */
}

::view-transition-old(nbjm-art),
::view-transition-new(nbjm-art) {
	animation-duration: 0.34s;
	height: 100%;
}

::view-transition-new(nbjm-now):only-child {
	animation: nbjm-now-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

::view-transition-old(nbjm-now):only-child {
	animation: nbjm-now-out 0.26s ease-in forwards;
}

@keyframes nbjm-now-out {
	to { opacity: 0; transform: translateY(6%); }
}

/*
 * Panels, the Now Playing sheet and the song menu animate out as well as
 * in: transitions that keep them drawn (display, overlay) until they've
 * faded, with @starting-style for the way in. Elsewhere the keyframes
 * above still animate the way in.
 */
@supports (transition-behavior: allow-discrete) {
	.nbjm-app .nbjm-drawer {
		--nbjm-drawer-from: 24px 0;
		opacity: 0;
		transition: opacity 0.18s ease-in, translate 0.18s ease-in, overlay 0.18s ease-in allow-discrete, display 0.18s ease-in allow-discrete;
		translate: var(--nbjm-drawer-from);
	}

	.nbjm-app .nbjm-drawer[open] {
		animation: none;
		opacity: 1;
		transition-duration: 0.22s;
		transition-timing-function: ease-out;
		translate: none;
	}

	/* Keeps the artwork tint's slow fade (see .nbjm-now above). */
	.nbjm-app .nbjm-now {
		opacity: 0;
		transition: --nbjm-now-tint 0.9s ease, opacity 0.24s ease-in, translate 0.24s ease-in, overlay 0.24s ease-in allow-discrete, display 0.24s ease-in allow-discrete;
		translate: 0 6%;
	}

	.nbjm-app .nbjm-now[open] {
		--nbjm-now-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
		animation: none;
		opacity: 1;
		transition: --nbjm-now-tint 0.9s ease, opacity 0.34s var(--nbjm-now-ease), translate 0.34s var(--nbjm-now-ease), overlay 0.34s var(--nbjm-now-ease) allow-discrete, display 0.34s var(--nbjm-now-ease) allow-discrete;
		translate: none;
	}

	/* Dragged away: already off screen, so it just goes. */
	.nbjm-app .nbjm-now.is-dismissed {
		transition: none;
	}

	@starting-style {
		.nbjm-app .nbjm-drawer[open] {
			opacity: 0;
			translate: var(--nbjm-drawer-from);
		}

		.nbjm-app .nbjm-now[open] {
			opacity: 0;
			translate: 0 6%;
		}
	}

	.nbjm-app :is(.nbjm-drawer, .nbjm-now)::backdrop {
		opacity: 0;
		transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
	}

	.nbjm-app :is(.nbjm-drawer, .nbjm-now)[open]::backdrop {
		opacity: 1;
	}

	@starting-style {
		.nbjm-app :is(.nbjm-drawer, .nbjm-now)[open]::backdrop {
			opacity: 0;
		}
	}

	@media (max-width: 759px) {
		.nbjm-app .nbjm-drawer {
			--nbjm-drawer-from: 0 24px;
		}

		.nbjm-app .nbjm-drawer--profile {
			--nbjm-drawer-from: -100% 0;
		}
	}
}

/* The song menu pops in; it closes at once (its anchor goes with it). */
@supports (transition-behavior: allow-discrete) and selector(:popover-open) {
	.nbjm-app .nbjm-menu[popover]:popover-open {
		opacity: 1;
		scale: 1;
		transform-origin: top right;
		transition: opacity 0.14s ease-out, scale 0.14s ease-out;
	}

	@starting-style {
		.nbjm-app .nbjm-menu[popover]:popover-open {
			opacity: 0;
			scale: 0.96;
		}
	}
}

/* The album page's header recedes as it scrolls away: the scene drifts, the cover fades back. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		/*
		 * Named on the header: it clips (overflow), so view() inside it would
		 * track the header, not the page. The album clips the same way but
		 * without being a scroll container, so the page's scroll reaches it.
		 */
		.nbjm-app .nbjm-album--page {
			overflow: clip;
		}

		.nbjm-app .nbjm-album--page .nbjm-album__head {
			view-timeline: --nbjm-album-head block;
		}

		.nbjm-app .nbjm-album--page .nbjm-album__scene {
			animation: nbjm-scene-drift linear both;
			animation-range: exit;
			animation-timeline: --nbjm-album-head;
		}

		.nbjm-app .nbjm-album--page .nbjm-album__art {
			animation: nbjm-art-recede linear both;
			animation-range: exit;
			animation-timeline: --nbjm-album-head;
		}
	}
}

@keyframes nbjm-scene-drift {
	to { translate: 0 30%; }
}

@keyframes nbjm-art-recede {
	to { opacity: 0.25; scale: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
	.nbjm-app *,
	.nbjm-app *::before,
	.nbjm-app *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.001ms !important;
	}

	.nbjm-app .nbjm-eq i {
		transform: scaleY(0.7);
	}
}

@media (forced-colors: active) {
	.nbjm-app .nbjm-play-btn,
	.nbjm-app .nbjm-add,
	.nbjm-app .nbjm-btn,
	.nbjm-app .nbjm-chip,
	.nbjm-app .nbjm-tabbar {
		border: 1px solid ButtonText;
	}
}

/*
 * iOS Safari zooms into any form field under 16px when it's focused (and the
 * zoomed page then scrolls sideways). Last in the file, and :is() gives every
 * field the same weight, so this wins over each field's own font size.
 */
@media (pointer: coarse) {
	.nbjm-app :is(input:not([type="range"], [type="checkbox"], [type="radio"], [type="file"]), select, textarea) {
		font-size: max(16px, 1em);
	}
}
