/* Lee Anne's Music — front-end player */
.lam {
	--lam-ink: #1d1b1a;
	--lam-muted: #6f6a66;
	--lam-line: rgba(29, 27, 26, .09);
	--lam-accent: #b0472f;
	--lam-radius: 9px;
	--lam-tint: 176, 132, 108;
	color: var(--lam-ink);
	font-size: 16px;
	line-height: 1.45;
	max-width: 1100px;
	margin: 0 auto;
	-webkit-font-smoothing: antialiased;
}
.lam *, .lam-bar * { box-sizing: border-box; }
.lam svg, .lam-bar svg { width: 1em; height: 1em; fill: currentColor; display: block; flex: none; }
.lam button, .lam-bar button { font: inherit; color: inherit; cursor: pointer; margin: 0; letter-spacing: normal; text-transform: none; }

/* ---------- Album header ---------- */
.lam-stage {
	position: relative;
	border-radius: calc(var(--lam-radius) + 3px);
	padding: clamp(18px, 4vw, 44px);
	background:
		radial-gradient(120% 90% at 0% 0%, rgba(var(--lam-tint), .38), transparent 60%),
		linear-gradient(180deg, rgba(var(--lam-tint), .16), rgba(var(--lam-tint), .04) 70%);
	transition: background .6s ease;
}
.lam-hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(20px, 3vw, 32px);
	align-items: start;
}
.lam-hero-art { position: relative; }
.lam-hero-img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
	border-radius: var(--lam-radius);
	box-shadow: 0 30px 60px -20px rgba(var(--lam-tint), .7), 0 12px 24px -12px rgba(0, 0, 0, .35);
	background: #ddd;
}
.lam-nocover {
	display: grid !important;
	place-items: center;
	color: #fff;
	background: linear-gradient(135deg, rgb(var(--lam-tint)), #3a2f2a) !important;
}
.lam-nocover svg { width: 40%; height: 40%; opacity: .85; }
.lam-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--lam-muted);
	margin-bottom: 8px;
}
.lam .lam-hero-title {
	font-size: clamp(30px, 5vw, 56px);
	line-height: 1.02;
	letter-spacing: -.02em;
	margin: 0 0 10px;
	color: var(--lam-ink);
	text-wrap: balance;
}
.lam-hero-artist { font-size: 18px; font-weight: 500; }
.lam-hero-meta { color: var(--lam-muted); font-size: 14px; margin-top: 4px; }
.lam-hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.lam .lam-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 22px;
	border-radius: 999px;
	border: 1px solid rgba(29, 27, 26, .16);
	background: rgba(255, 255, 255, .7);
	font-size: 15px;
	font-weight: 600;
	transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.lam .lam-btn svg { width: 18px; height: 18px; }
.lam .lam-btn:hover { background: #fff; transform: translateY(-1px); }
.lam .lam-btn-primary { background: var(--lam-ink); color: #fff; border-color: var(--lam-ink); }
.lam .lam-btn-primary:hover { background: #000; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }

/* ---------- Track list ---------- */
.lam .lam-tracks { list-style: none; margin: clamp(22px, 4vw, 40px) 0 0; padding: 0; }
.lam .lam-track { margin: 0; padding: 0; border-top: 1px solid var(--lam-line); }
.lam .lam-track:last-child { border-bottom: 1px solid var(--lam-line); }
.lam .lam-track-btn {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: grid;
	grid-template-columns: 20px 1fr auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 13px 14px;
	border-radius: 12px;
	transition: background .15s ease;
}
.lam .lam-track-btn:hover { background: rgba(255, 255, 255, .6); }
.lam .lam-track-btn:focus-visible { outline: 2px solid var(--lam-ink); outline-offset: -2px; }
.lam .lam-track-num { position: relative; width: 20px; height: 24px; align-self: center; display: grid; grid-template-columns: 20px; grid-template-rows: 24px; place-items: center start; overflow: hidden; color: var(--lam-muted); font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }
.lam .lam-track-num .lam-n { line-height: 1; display: block; }
.lam .lam-track-title, .lam .lam-track-len { line-height: 24px; align-self: center; }
.lam-track-num > * { grid-area: 1 / 1; }
.lam-track-ico, .lam-eq { opacity: 0; }
.lam-track-ico svg { width: 16px; height: 16px; color: var(--lam-ink); }
.lam-track-btn:hover .lam-n { opacity: 0; }
.lam-track-btn:hover .lam-track-ico { opacity: 1; }
.lam-track-title { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lam-track-len { color: var(--lam-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.lam-track.is-current .lam-track-title { color: var(--lam-accent); font-weight: 650; }
.lam-track.is-current .lam-n { opacity: 0; }
.lam-track.is-current .lam-eq { opacity: 1; }
.lam-track.is-current .lam-track-btn:hover .lam-eq { opacity: 0; }
.lam-track.is-current .lam-track-btn:hover .lam-track-ico { opacity: 1; }
.lam-track.is-current:not(.is-paused) .lam-track-btn:hover .lam-track-ico svg { display: none; }
.lam-track.is-current:not(.is-paused) .lam-track-btn:hover .lam-track-ico::before {
	content: ""; display: block; width: 12px; height: 13px;
	border-left: 4px solid var(--lam-ink); border-right: 4px solid var(--lam-ink);
}
.lam .lam-eq { display: flex; gap: 2px; align-items: flex-end; width: 13px; height: 14px; }
.lam .lam-eq i { flex: none; margin: 0; padding: 0; font-size: 0; line-height: 0; }
.lam-eq i { width: 3px; background: var(--lam-accent); border-radius: 2px; height: 40%; animation: lam-eq 1s ease-in-out infinite; }
.lam-eq i:nth-child(2) { animation-delay: -.35s; }
.lam-eq i:nth-child(3) { animation-delay: -.7s; }
.lam-track.is-paused .lam-eq i { animation-play-state: paused; }
@keyframes lam-eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* ---------- Album shelf ---------- */
.lam-shelf-wrap { margin: 0 0 clamp(24px, 4vw, 40px); }
.lam .lam-shelf-title { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--lam-muted); margin: 0 0 14px; }
.lam-shelf {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 22px 20px;
}
.lam .lam-card {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.lam-card-art { position: relative; display: block; border-radius: 7px; margin-bottom: 8px; transition: transform .25s ease, box-shadow .25s ease; }
.lam-card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; border-radius: 7px; background: #e6e2df; }
.lam .lam-card:hover .lam-card-art { transform: translateY(-4px); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .45); }
.lam .lam-card:focus-visible .lam-card-art { outline: 3px solid var(--lam-ink); outline-offset: 3px; }
.lam-card.is-viewing .lam-card-art { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lam-ink); }
.lam-card-play {
	position: absolute; right: 10px; bottom: 10px;
	width: 44px; height: 44px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--lam-ink); color: #fff;
	box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .55);
	opacity: 0; transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease;
}
.lam-card-play svg { width: 18px; height: 18px; margin-left: 2px; }
.lam .lam-card:hover .lam-card-play, .lam .lam-card:focus-visible .lam-card-play { opacity: 1; transform: none; }
.lam-card-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lam-card-meta { color: var(--lam-muted); font-size: 14px; }
.lam-card.is-playing .lam-card-title::after {
	content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px;
	border-radius: 50%; background: var(--lam-accent); vertical-align: middle;
}

/* ---------- Now-playing bar ---------- */
.lam-bar {
	--lam-ink: #1d1b1a;
	position: fixed;
	left: 50%;
	bottom: 16px;
	z-index: 99990;
	width: min(980px, calc(100% - 24px));
	transform: translate(-50%, 140%);
	opacity: 0;
	transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
	background: rgba(24, 22, 21, .92);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	color: #fff;
	border-radius: 10px;
	box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .55);
	overflow: hidden;
	font-size: 15px;
	line-height: 1.3;
}
.lam-bar.is-visible { transform: translate(-50%, 0); opacity: 1; }
.lam-bar-progress { display: none; height: 3px; background: rgba(255, 255, 255, .15); cursor: pointer; }
.lam-bar-fill { height: 100%; width: 0; background: #fff; }
.lam-bar-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, .8fr);
	align-items: center;
	gap: 18px;
	padding: 12px 18px 12px 12px;
}
.lam-bar-now { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.lam-bar-art { flex: none; width: 52px; height: 52px; }
.lam-bar-img { width: 52px; height: 52px; object-fit: cover; border-radius: 5px; display: block; }
.lam-bar-text { min-width: 0; }
.lam-bar-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lam-bar-album { color: rgba(255, 255, 255, .62); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.lam-bar-center { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lam-bar-controls { display: flex; align-items: center; justify-content: center; gap: 6px; }
.lam-bar .lam-ib {
	all: unset;
	box-sizing: border-box;
	position: relative;
	cursor: pointer;
	width: 36px; height: 36px;
	display: grid; place-items: center;
	border-radius: 50%;
	color: rgba(255, 255, 255, .85);
	transition: background .15s ease, color .15s ease, transform .1s ease;
}
.lam-bar .lam-ib svg { width: 18px; height: 18px; }
.lam-bar .lam-ib:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.lam-bar .lam-ib:active { transform: scale(.94); }
.lam-bar .lam-ib:focus-visible { outline: 2px solid #fff; }
.lam-bar .lam-ib[aria-pressed="false"] { color: rgba(255, 255, 255, .5); }
.lam-bar .lam-ib[aria-pressed="true"] { color: #f2b49f; }
.lam-bar .lam-ib[aria-pressed="true"]::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateY(14px); }
.lam-bar .lam-main { width: 42px; height: 42px; background: #fff; color: #111; margin: 0 4px; }
.lam-bar .lam-main:hover { background: #fff; color: #000; transform: scale(1.05); }
.lam-bar .lam-main svg { width: 20px; height: 20px; }
.lam-bar.is-loading .lam-main { animation: lam-pulse 1s ease-in-out infinite; }
@keyframes lam-pulse { 50% { opacity: .55; } }
.lam-seek { display: flex; align-items: center; gap: 10px; }
.lam-t { font-size: 12px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.lam-bar-vol { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.lam-bar-vol .lam-range { max-width: 110px; }

.lam-range {
	--lam-p: 0%;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.lam-range::-webkit-slider-runnable-track {
	height: 4px; border-radius: 4px;
	background: linear-gradient(90deg, #fff var(--lam-p), rgba(255, 255, 255, .22) var(--lam-p));
}
.lam-range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.lam-range::-moz-range-progress { height: 4px; border-radius: 4px; background: #fff; }
.lam-range::-webkit-slider-thumb {
	-webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
	background: #fff; margin-top: -4px; opacity: 0; transition: opacity .15s;
}
.lam-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.lam-range:hover::-webkit-slider-thumb, .lam-range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.lam-range:hover::-moz-range-thumb, .lam-range:focus-visible::-moz-range-thumb { opacity: 1; }
.lam-range:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; border-radius: 4px; }

body.lam-bar-open { padding-bottom: 110px; }
body.lam-bar-open .scroll-top, body.lam-bar-open #scroll-top { bottom: 120px !important; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
	.lam-hero { grid-template-columns: 1fr; text-align: center; align-items: start; }
	.lam-hero-art { width: 100%; }
	.lam-hero-actions { justify-content: center; }
	.lam .lam-btn { flex: 1 1 0; justify-content: center; max-width: 180px; }
	.lam .lam-track-btn { padding: 12px 6px; grid-template-columns: 20px 1fr auto; column-gap: 10px; }
	.lam-shelf { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
	.lam-shelf::-webkit-scrollbar { display: none; }
	.lam .lam-card { flex: 0 0 40%; scroll-snap-align: start; }
	.lam-card-play { opacity: 1; transform: none; width: 38px; height: 38px; }

	.lam-bar { bottom: 8px; border-radius: 8px; }
	.lam-bar-progress { display: block; }
	.lam-bar-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 8px 8px 8px; }
	.lam-bar-art, .lam-bar-img { width: 44px; height: 44px; }
	.lam-seek, .lam-bar-vol, .lam-bar .lam-shuffle, .lam-bar .lam-repeat { display: none; }
	.lam-bar .lam-prev { display: none; }
	body.lam-bar-open { padding-bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
	.lam *, .lam-bar, .lam-bar * { transition: none !important; animation: none !important; }
}

.lam-empty { padding: 24px; border: 1px dashed #ccc; border-radius: 12px; text-align: center; }
