/* Just played (MAKERS-50): the songs that just played under the live player, each with its Apple Music artwork (a
   soft glow of its own colors behind it) and a Listen button that opens Apple Music. A new song drops in from above
   and pushes the others to the right, which settle with a little spring.
   Dark Radio Eshgh look, #64edaa green, clear Liquid Glass cards, phone first. Reduce Motion: fades only. */

.just-played { --jp-green: #64edaa; --jp-ink: #f5f5f7; --jp-ink-2: #a1a1a6; --jp-glass: rgb(20 27 23 / .58); --jp-line: rgb(215 255 231 / .14); position: relative; margin-top: clamp(22px, 3vw, 34px); color: var(--jp-ink); }
.just-played[hidden] { display: none; }
.jp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.jp-title { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-family: var(--heading, Unbounded, system-ui, sans-serif); font-size: clamp(17px, 1.6vw, 20px); font-weight: 600; letter-spacing: -.02em; }
.jp-title svg { width: 18px; height: 18px; flex: none; fill: var(--jp-green); }

/* No mask on the row: a mask makes the row its own backdrop, and the glass cards would then see nothing behind them.
   The soft ends come from the cards instead (owner's note, Oct 29: "the second image looks not faded; it's sharp"):
   a card at an end of the row melts away over the last few dozen pixels with a mask of its own (.jp-edge) and is
   fainter the less of it shows (--jp-fade). now-played.js places both. The open live chat is not an end of the row
   (owner's note, October 30, 2026): the cards show softly through its frosted glass, and the row never moves when it
   opens. A mask or opacity on the card itself keeps its glass real; only one on the row would not. */
.jp-list { overflow-anchor: none; display: flex; gap: 14px; margin: 0 -16px; padding: 10px 16px 26px; list-style: none; overflow-x: auto; overflow-y: visible; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
.jp-list::-webkit-scrollbar { display: none; }

/* Owner's notes (Oct 28 and 29): cards that float in the air, made of truly clear Liquid Glass like the iOS dock. The
   glass is almost untinted: what plays behind shows through with only a light blur, and at the rim it bends with a faint
   prism fringe (now-played.js adds the shared #jp-lens filter, .jp-lensed, in Chromium). A bright rim catches the light,
   two shadows lift it off the page, and each card bobs very gently on its own rhythm. */
.jp-card {
	--jp-i: 0;
	position: relative; flex: none; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px;
	width: min(78vw, 300px); padding: 10px 12px 10px 10px; border-radius: 22px; scroll-snap-align: start; isolation: isolate; overflow: hidden;
	background:
		linear-gradient(180deg, rgb(255 255 255 / .11) 0%, rgb(255 255 255 / .025) 42%, rgb(255 255 255 / .05) 100%),
		rgb(10 16 13 / .1);
	-webkit-backdrop-filter: blur(10px) saturate(170%) brightness(1.06); backdrop-filter: blur(10px) saturate(170%) brightness(1.06);
	border: 1px solid rgb(255 255 255 / .16);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / .42),
		inset 0 -1px 0 rgb(255 255 255 / .08),
		inset 1px 0 0 rgb(255 255 255 / .06),
		inset -1px 0 0 rgb(255 255 255 / .06),
		0 2px 6px rgb(0 0 0 / .16),
		0 18px 40px -12px rgb(0 0 0 / .42);
	animation: jp-float 6.5s ease-in-out calc(var(--jp-i) * -1.3s) infinite;
	opacity: var(--jp-fade, 1);
	transition: box-shadow .35s ease, border-color .35s ease;
	will-change: transform, translate;
}
/* Real refraction (Chromium): a light blur first, then the bend at the rim, then a little saturation, like the theme's
   glass. The text keeps a soft shadow so it reads on any picture. */
.jp-lensed .jp-card { -webkit-backdrop-filter: blur(3px) url(#jp-lens) saturate(165%) brightness(1.05); backdrop-filter: blur(3px) url(#jp-lens) saturate(165%) brightness(1.05); }
.jp-song, .jp-artist { text-shadow: 0 1px 2px rgb(0 0 0 / .45); }
/* The light that sits on glass: a soft specular sweep across the top and a faint glint on the lower edge. */
.jp-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgb(255 255 255 / .16) 0%, transparent 30%, transparent 72%, rgb(255 255 255 / .07) 100%); }
.jp-card:hover { border-color: rgb(255 255 255 / .24); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), inset 0 -1px 0 rgb(255 255 255 / .1), inset 1px 0 0 rgb(255 255 255 / .08), inset -1px 0 0 rgb(255 255 255 / .08), 0 4px 10px rgb(0 0 0 / .18), 0 26px 50px -14px rgb(0 0 0 / .48), 0 0 36px -8px rgb(100 237 170 / .22); }
.jp-card.jp-edge {
	-webkit-mask-image: linear-gradient(90deg, transparent var(--jp-l0, -2px), #000 var(--jp-l1, -1px), #000 var(--jp-r1, 10000px), transparent var(--jp-r0, 10001px));
	mask-image: linear-gradient(90deg, transparent var(--jp-l0, -2px), #000 var(--jp-l1, -1px), #000 var(--jp-r1, 10000px), transparent var(--jp-r0, 10001px));
}
@keyframes jp-float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); } 50% { transform: translate3d(0, -4px, 0) rotate(.25deg); } }
/* The artwork's own colors glow from behind it, like Apple Music (owner's note, Oct 29: "the colors and glow should
   spread from behind; the image shouldn't be cut like this; a line falls on it"). A larger, blurred copy of the picture
   sits under it, and a round mask fades that copy out softly into the card, so the glow never ends in an edge. The
   picture itself has no border, rim, dark backing or shadow, so no line crosses it. */
.jp-art { position: relative; width: 64px; height: 64px; }
.jp-art img, .jp-art svg { position: relative; z-index: 1; display: block; width: 64px; height: 64px; border-radius: 13px; object-fit: cover; }
.jp-art .jp-glow { position: absolute; left: -22px; top: -18px; z-index: 0; width: 120px; height: 100px; border-radius: 0; object-fit: cover; filter: blur(14px) saturate(180%) brightness(1.12); opacity: .68; pointer-events: none; -webkit-mask-image: radial-gradient(closest-side, #000 30%, rgb(0 0 0 / .45) 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 30%, rgb(0 0 0 / .45) 62%, transparent 100%); }
.jp-art svg { padding: 14px; box-sizing: border-box; fill: var(--jp-green); background: radial-gradient(circle at 50% 35%, #1a3a2a, #08120d); }
.jp-meta { min-width: 0; display: grid; gap: 2px; }
.jp-song { overflow: hidden; font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.jp-artist { overflow: hidden; color: var(--jp-ink-2); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.jp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.jp-when { color: #6e6e73; font-size: 12px; white-space: nowrap; }
.jp-apple { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: #f5f5f7; color: #000; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .2s; }
.jp-apple svg { width: 14px; height: 14px; fill: currentColor; }
.jp-apple:hover { background: #fff; }
.jp-apple:active { transform: scale(.96); }
.jp-apple:focus-visible { outline: 2px solid var(--jp-green); outline-offset: 2px; }

/* A new song: the drop from above and the push of the others run in now-played.js (Web Animations with a spring), so
   they can carry real physics; here only the green light that passes over the new card once. */
.jp-card.jp-new::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(100deg, transparent 20%, rgb(100 237 170 / .22) 50%, transparent 80%); background-size: 220% 100%; animation: jp-sheen 1.6s ease-out .45s both; }
@keyframes jp-sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* Loading: skeleton cards with a soft shimmer. */
.jp-card.jp-skeleton .jp-art span, .jp-skeleton .jp-line { display: block; border-radius: 10px; background: linear-gradient(90deg, rgb(255 255 255 / .06) 0, rgb(255 255 255 / .13) 40%, rgb(255 255 255 / .06) 80%); background-size: 300% 100%; animation: jp-shimmer 1.4s linear infinite; }
.jp-card.jp-skeleton .jp-art span { width: 64px; height: 64px; border-radius: 13px; }
.jp-skeleton .jp-line { height: 12px; margin: 5px 0; }
.jp-skeleton .jp-line + .jp-line { width: 60%; }
@keyframes jp-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (min-width: 900px) { .jp-list { margin: 0; padding-inline: 0; } .jp-card { width: 280px; } }

/* The cards' light spreads and fades, never cut (owner's note, October 29, 2026: "The light behind these panels is
   important; they shouldn't get cut; they should spread smoothly"). The row scrolls sideways, and a scroller clips, so
   it keeps room for the light inside its own box (padding: the green glow and the soft shadow under a card), given
   back with a negative margin: the cards stay exactly where they were. On computers the row's ends get room too (its
   edge fade still melts the cards away at the row's ends, now-played.js). The heading stays above the row's room. */
.jp-head { position: relative; z-index: 1; }
.jp-list { padding-top: 32px; padding-bottom: 66px; margin-top: -22px; margin-bottom: -40px; }
@media (min-width: 900px) { .jp-list { padding-inline: 28px; margin-inline: -28px; scroll-padding-inline: 28px; } }

@media (prefers-reduced-motion: reduce) {
	.jp-card { animation: none; }
	.jp-card.jp-new { animation: jp-fade .4s ease both; }
	.jp-card.jp-new::after { animation: none; display: none; }
	.jp-card.jp-skeleton .jp-art span, .jp-skeleton .jp-line { animation: none; }
	.jp-apple { transition: none; }
}
/* The site's Quiet motion switch (the theme puts body.quiet-motion on every page) quiets the same motion as Reduce
   Motion (MAKERS-62, P6-06): the cards stop bobbing and a new song only fades in. */
body.quiet-motion .jp-card { animation: none; }
body.quiet-motion .jp-card.jp-new { animation: jp-fade .4s ease both; }
body.quiet-motion .jp-card.jp-new::after { animation: none; display: none; }
body.quiet-motion .jp-card.jp-skeleton .jp-art span, body.quiet-motion .jp-skeleton .jp-line { animation: none; }
body.quiet-motion .jp-apple { transition: none; }
/* Reduce Transparency: a solid dark card, no see-through glass; the art keeps a quieter glow inside the card. */
@media (prefers-reduced-transparency: reduce) {
	.jp-card, .jp-lensed .jp-card { background: rgb(18 26 22); -webkit-backdrop-filter: none; backdrop-filter: none; }
	.jp-art .jp-glow { opacity: .4; }
}
@keyframes jp-fade { from { opacity: 0; } to { opacity: 1; } }
