/*! Artist Music Hub — front end. Everything is scoped under .amh-widget, #amh-np-footer and .amh-modal. */

/* ============ Tokens ============ */
.amh-widget,
#amh-np-footer,
.amh-modal {
	--amh-accent: #7c5cff;
	--amh-on-accent: #fff;
	--amh-radius: 14px;
	--amh-bg: #121219;
	--amh-card: #1a1a24;
	--amh-card2: #22222e;
	--amh-fg: #f2f2f7;
	--amh-mut: #9a9aae;
	--amh-line: rgba(255, 255, 255, .08);
	--amh-shadow: 0 18px 50px rgba(0, 0, 0, .55);
	--amh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--amh-accent-soft: rgba(124, 92, 255, .16);
	--amh-accent-soft: color-mix(in srgb, var(--amh-accent) 16%, transparent);
	--amh-accent-text: color-mix(in srgb, var(--amh-accent) 60%, var(--amh-fg));
	color-scheme: dark;
}
.amh-widget.amh-theme-light,
#amh-np-footer.amh-theme-light {
	--amh-bg: #fff;
	--amh-card: #f4f4f7;
	--amh-card2: #e9e9ef;
	--amh-fg: #16161d;
	--amh-mut: #62627a;
	--amh-line: rgba(0, 0, 0, .09);
	--amh-shadow: 0 18px 50px rgba(20, 20, 40, .18);
	color-scheme: light;
}
@media (prefers-color-scheme: light) {
	.amh-widget.amh-theme-auto,
	#amh-np-footer.amh-theme-auto {
		--amh-bg: #fff;
		--amh-card: #f4f4f7;
		--amh-card2: #e9e9ef;
		--amh-fg: #16161d;
		--amh-mut: #62627a;
		--amh-line: rgba(0, 0, 0, .09);
		--amh-shadow: 0 18px 50px rgba(20, 20, 40, .18);
		color-scheme: light;
	}
}

/* ============ Isolation / resets (themes must not bleed in) ============ */
.amh-widget,
#amh-np-footer,
.amh-modal {
	color: var(--amh-fg);
	font-family: var(--amh-font);
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
	letter-spacing: normal;
	text-transform: none;
	-webkit-font-smoothing: antialiased;
}
.amh-widget {
	container-type: inline-size;
	container-name: amh;
	margin: 0 0 1.5em;
	max-width: 100%;
}
.amh-widget *,
.amh-widget *::before,
.amh-widget *::after,
#amh-np-footer *,
#amh-np-footer *::before,
#amh-np-footer *::after,
.amh-modal *,
.amh-modal *::before,
.amh-modal *::after { box-sizing: border-box; }
.amh-widget :where(h1, h2, h3, h4, p, ul, ol, li, figure),
#amh-np-footer :where(p, ul, ol, li),
.amh-modal :where(h2, h3, p, ul, ol, li) { margin: 0; padding: 0; border: 0; font-family: inherit; color: inherit; letter-spacing: normal; text-transform: none; background: none; }
.amh-widget :where(ul, ol) { list-style: none; }
.amh-widget :where(li)::before,
.amh-widget :where(li)::marker { content: none; }
.amh-widget :where(a),
#amh-np-footer :where(a),
.amh-modal :where(a) { color: inherit; text-decoration: none; box-shadow: none; border: 0; background: none; }
.amh-widget :where(a:hover, a:focus),
#amh-np-footer :where(a:hover, a:focus) { color: inherit; text-decoration: none; }
.amh-widget :where(img),
#amh-np-footer :where(img),
.amh-modal :where(img) { display: block; max-width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 0; }
.amh-widget :where(button),
#amh-np-footer :where(button),
.amh-modal :where(button) {
	font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal; text-shadow: none;
	box-shadow: none; min-height: 0; min-width: 0; height: auto; width: auto; line-height: 1.2;
	cursor: pointer; -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; border-radius: 0;
}
.amh-widget :where(svg),
#amh-np-footer :where(svg),
.amh-modal :where(svg) { display: block; }
.amh-widget [hidden],
#amh-np-footer [hidden],
.amh-modal [hidden] { display: none !important; }
.amh-widget :focus-visible,
#amh-np-footer :focus-visible,
.amh-modal :focus-visible { outline: 2px solid var(--amh-accent); outline-offset: 2px; }

/* ============ Building blocks ============ */
.amh-widget .amh-box {
	background: var(--amh-bg);
	border: 1px solid var(--amh-line);
	border-radius: var(--amh-radius);
	padding: 20px;
}
.amh-widget .amh-mut,
#amh-np-footer .amh-mut { color: var(--amh-mut); }
.amh-widget .amh-push { margin-left: auto; }
.amh-widget .amh-kicker { color: var(--amh-mut); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.amh-widget .amh-kicker-row { display: flex; gap: 6px; align-items: center; }
.amh-widget .amh-subh { font-weight: 700; margin: 4px 0 6px; }
.amh-widget .amh-icon,
#amh-np-footer .amh-icon,
.amh-modal .amh-icon { width: 15px; height: 15px; fill: currentColor; }

/* platform letter badge (brand colour, never a logo) */
.amh-pb {
	display: inline-grid; place-items: center; flex: 0 0 auto;
	width: 22px; height: 22px; border-radius: 50%;
	background: var(--amh-pb-bg, #4b4b5a); color: var(--amh-pb-fg, #fff);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
	font: 800 11px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.3px;
}
.amh-pb.amh-pb-sm { width: 16px; height: 16px; font-size: 8.5px; }

/* chips */
.amh-widget .amh-chips,
#amh-np-footer .amh-chips { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.amh-widget .amh-chip,
#amh-np-footer .amh-chip,
.amh-modal .amh-chip {
	display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
	background: var(--amh-card2); color: var(--amh-fg);
	border: 1px solid var(--amh-line); border-radius: 20px;
	padding: 4px 10px 4px 4px; font-size: 11.5px; font-weight: 600; line-height: 1.2;
	transition: border-color .15s;
}
.amh-widget .amh-chip.amh-chip-ic,
#amh-np-footer .amh-chip.amh-chip-ic { padding: 3px; }
.amh-widget .amh-chip:hover,
#amh-np-footer .amh-chip:hover,
.amh-modal .amh-chip:hover { border-color: var(--amh-accent); color: var(--amh-fg); }

/* icon buttons */
.amh-widget .amh-ibtn,
#amh-np-footer .amh-ibtn,
.amh-modal .amh-ibtn {
	display: inline-grid; place-items: center; flex: 0 0 auto;
	width: 34px; height: 34px; border-radius: 50%;
	background: var(--amh-card2); color: var(--amh-fg);
	border: 1px solid var(--amh-line);
	transition: border-color .15s, transform .15s;
}
.amh-widget .amh-ibtn:hover,
#amh-np-footer .amh-ibtn:hover,
.amh-modal .amh-ibtn:hover { border-color: var(--amh-accent); }
.amh-widget .amh-ibtn.amh-ibtn-acc,
#amh-np-footer .amh-ibtn.amh-ibtn-acc { background: var(--amh-accent); border-color: var(--amh-accent); color: var(--amh-on-accent); }
.amh-widget .amh-ibtn.amh-ibtn-big { width: 48px; height: 48px; }
.amh-widget .amh-ibtn.amh-ibtn-big .amh-icon { width: 18px; height: 18px; }

/* share button */
.amh-widget .amh-share-btn {
	display: inline-flex; align-items: center; gap: 6px;
	border: 1px solid var(--amh-line); border-radius: 30px; color: var(--amh-fg);
	padding: 6px 12px; font-size: 12px; font-weight: 600;
}
.amh-widget .amh-share-btn:hover { border-color: var(--amh-accent); }
.amh-widget .amh-share-btn .amh-icon { width: 13px; height: 13px; }

/* tabs */
.amh-widget .amh-tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--amh-card); border: 1px solid var(--amh-line); border-radius: 30px; max-width: 100%; overflow-x: auto; }
.amh-widget .amh-tabs [role="tab"] { color: var(--amh-mut); padding: 7px 16px; border-radius: 30px; font-weight: 600; font-size: 13px; white-space: nowrap; transition: background .15s, color .15s; }
.amh-widget .amh-tabs [role="tab"]:hover { color: var(--amh-fg); }
.amh-widget .amh-tabs [role="tab"][aria-selected="true"] { background: var(--amh-accent); color: var(--amh-on-accent); }

/* equalizer */
.amh-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; flex: 0 0 auto; }
.amh-eq i { display: block; width: 3px; height: 30%; background: var(--amh-accent); border-radius: 2px; animation: amh-eq .9s ease-in-out infinite; }
.amh-eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.amh-eq i:nth-child(3) { animation-delay: -.55s; animation-duration: 1.1s; }
.amh-eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
.amh-eq.amh-is-stopped i { animation: none; height: 25%; opacity: .5; }
@keyframes amh-eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }

/* covers / placeholders */
.amh-widget .amh-ph,
#amh-np-footer .amh-ph,
.amh-modal .amh-ph {
	display: grid; place-items: center; width: 100%; height: 100%;
	background: radial-gradient(circle at 30% 25%, var(--amh-accent-soft), transparent 60%), linear-gradient(140deg, var(--amh-card2), var(--amh-card));
	color: var(--amh-mut); font-size: 20px; font-weight: 800;
}
.amh-widget .amh-cover {
	display: block; position: relative; width: 100%; aspect-ratio: 1; overflow: hidden;
	border-radius: calc(var(--amh-radius) * .6); background: var(--amh-card2); margin-bottom: 8px;
}
.amh-widget .amh-cover img { width: 100%; height: 100%; object-fit: cover; }
.amh-widget .amh-cover-play {
	position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%;
	background: var(--amh-accent); color: var(--amh-on-accent); display: grid; place-items: center;
	opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.amh-widget .amh-cover:hover .amh-cover-play,
.amh-widget .amh-cover:focus-visible .amh-cover-play,
.amh-widget .amh-citem.amh-on .amh-cover-play { opacity: 1; transform: none; }
@media (hover: none) { .amh-widget .amh-cover-play { opacity: .92; transform: none; } }

/* empty state */
.amh-widget .amh-empty { display: flex; gap: 12px; align-items: center; color: var(--amh-mut); }
.amh-widget .amh-empty p { flex: 1; }
.amh-widget .amh-empty-link { color: var(--amh-accent-text); text-decoration: underline; font-weight: 600; }

/* ============ Now Playing card + footer (shared parts) ============ */
.amh-np-cov { position: relative; width: 52px; height: 52px; flex: 0 0 auto; border-radius: calc(var(--amh-radius) * .5); overflow: hidden; background: var(--amh-card2); }
.amh-np-cov img { width: 100%; height: 100%; object-fit: cover; }
.amh-np-cov::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid transparent; transition: border-color .3s; pointer-events: none; }
[data-state="playing"] .amh-np-cov::after,
.amh-np-footer.amh-is-playing .amh-np-cov::after { border-color: var(--amh-accent); }
.amh-np-meta { min-width: 0; }
.amh-np-k { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--amh-accent-text); font-weight: 800; min-width: 0; }
.amh-np-via { letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--amh-mut); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-widget .amh-np-t,
#amh-np-footer .amh-np-t { display: block; font-weight: 700; font-size: 15px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-widget a.amh-np-t[href]:hover,
#amh-np-footer a.amh-np-t[href]:hover { text-decoration: underline; }
.amh-np-a { color: var(--amh-mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-np-listen { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.amh-listen-l { font-size: 11.5px; color: var(--amh-mut); margin-right: 2px; white-space: nowrap; }
.amh-np-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--amh-line); }
.amh-np-prog i { display: block; height: 100%; width: 0; background: var(--amh-accent); transition: width 1s linear; }
.amh-np-time { position: absolute; right: 16px; bottom: 6px; font-size: 10px; color: var(--amh-mut); font-variant-numeric: tabular-nums; }

/* inline card */
.amh-widget .amh-npc { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px 20px 14px; overflow: hidden; }
.amh-widget .amh-npc .amh-np-cov { width: 72px; height: 72px; }
.amh-widget .amh-npc .amh-np-listen { margin-top: 8px; }
.amh-widget .amh-npc[data-state="none"] .amh-np-t:empty::before { content: "—"; color: var(--amh-mut); }
.amh-widget.amh-layout-compact .amh-npc .amh-np-cov { width: 44px; height: 44px; }
.amh-widget.amh-layout-compact .amh-npc .amh-np-listen { display: none; }

/* ============ Footer bar ============ */
#amh-np-footer {
	position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 99990;
	max-width: 1200px; margin: 0 auto;
	transition: transform .35s ease, opacity .35s ease;
}
#amh-np-footer.amh-np-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; visibility: hidden; }
#amh-np-footer .amh-np-inner {
	position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
	background: var(--amh-bg);
	background: color-mix(in srgb, var(--amh-bg) 84%, transparent);
	-webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
	border: 1px solid var(--amh-line); border-radius: var(--amh-radius);
	padding: 10px 14px 14px 10px; box-shadow: var(--amh-shadow); overflow: hidden;
}
#amh-np-footer .amh-np-right { display: flex; align-items: center; gap: 8px; }
#amh-np-footer .amh-np-ctrl { display: flex; gap: 6px; align-items: center; }
#amh-np-footer .amh-np-eqmini,
#amh-np-footer .amh-np-exp { display: none; }
#amh-np-footer.amh-is-last .amh-np-prog,
#amh-np-footer.amh-is-last .amh-np-time { display: none; }
#amh-np-footer.amh-is-last .amh-np-inner { padding-bottom: 10px; }
#amh-np-footer.amh-is-audio .amh-np-prog { cursor: pointer; height: 4px; }
/* minimised */
#amh-np-footer.amh-np-min { left: auto; right: 14px; }
#amh-np-footer.amh-np-min .amh-np-inner { grid-template-columns: auto auto; gap: 8px; padding: 6px; border-radius: 40px; }
#amh-np-footer.amh-np-min .amh-np-meta,
#amh-np-footer.amh-np-min .amh-np-listen,
#amh-np-footer.amh-np-min .amh-np-share,
#amh-np-footer.amh-np-min .amh-np-stop,
#amh-np-footer.amh-np-min .amh-np-time,
#amh-np-footer.amh-np-min .amh-np-min,
#amh-np-footer.amh-np-min .amh-np-ctrl [data-amh-pl="prev"],
#amh-np-footer.amh-np-min .amh-np-ctrl [data-amh-pl="next"] { display: none; }
#amh-np-footer.amh-np-min .amh-np-prog { opacity: .7; }
#amh-np-footer.amh-np-min .amh-np-cov { width: 40px; height: 40px; border-radius: 50%; }
#amh-np-footer.amh-np-min .amh-np-exp { display: inline-grid; }
#amh-np-footer.amh-np-min .amh-np-eqmini { display: inline-flex; margin: 0 4px; }
#amh-np-footer.amh-np-min .amh-np-right { gap: 6px; }

/* keep page content clear of the bar */
html.amh-np-on body { padding-bottom: 96px; }
html.amh-np-on.amh-np-is-min body { padding-bottom: 72px; }

/* Ajax navigation progress */
html.amh-loading::before {
	content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100000;
	background: linear-gradient(90deg, transparent, #7c5cff, transparent);
	background-size: 50% 100%; background-repeat: no-repeat;
	animation: amh-load 1s linear infinite;
}
html.amh-loading body { cursor: progress; }
@keyframes amh-load { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ============ Artist ============ */
.amh-widget .amh-art { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.amh-widget .amh-art-media { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--amh-radius); overflow: hidden; background: var(--amh-card2); align-self: start; }
.amh-widget .amh-art-media img { width: 100%; height: 100%; object-fit: cover; }
.amh-widget .amh-art-media .amh-ph { font-size: 48px; }
.amh-widget .amh-art-src {
	position: absolute; left: 10px; bottom: 10px; display: inline-flex; gap: 5px; align-items: center;
	background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px 3px 3px; border-radius: 20px;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.amh-widget .amh-art-name { font-size: 34px; line-height: 1.1; font-weight: 800; margin: 2px 0 6px; letter-spacing: -1px; overflow-wrap: anywhere; }
.amh-widget .amh-stats { display: flex; gap: 22px; margin: 10px 0 12px; }
.amh-widget .amh-stats b { display: block; font-size: 20px; }
.amh-widget .amh-stats small { color: var(--amh-mut); font-size: 12px; }
.amh-widget .amh-genres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.amh-widget .amh-genres span { font-size: 11.5px; padding: 4px 10px; border-radius: 20px; background: var(--amh-accent-soft); color: var(--amh-accent-text); font-weight: 600; }
.amh-widget .amh-art-bio { color: var(--amh-mut); line-height: 1.6; margin-bottom: 14px; }
.amh-widget .amh-art-bio p + p { margin-top: .7em; }
.amh-widget .amh-follow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.amh-widget .amh-follow .amh-chip { padding: 5px 12px 5px 5px; font-size: 12px; font-weight: 700; border-radius: 30px; }
.amh-widget.amh-layout-compact .amh-art { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; }
.amh-widget.amh-layout-compact .amh-art-name { font-size: 22px; }
.amh-widget.amh-layout-compact .amh-art-src { display: none; }
.amh-widget.amh-layout-list .amh-art { grid-template-columns: 160px minmax(0, 1fr); }

/* track rows (artist top tracks + playlist) */
.amh-widget .amh-toptracks,
.amh-widget .amh-cpl-list { margin: 0 0 14px; }
.amh-widget .amh-trk {
	display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
	padding: 6px 8px; border-radius: 10px; font-size: 13px; transition: background .15s;
}
.amh-widget .amh-trk:hover { background: var(--amh-card); }
.amh-widget .amh-trk.amh-on { background: var(--amh-accent-soft); }
.amh-widget .amh-trk[data-amh-track] { cursor: pointer; }
.amh-widget .amh-trk[data-unplayable] { opacity: .7; }
.amh-widget .amh-trk-play { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--amh-mut); font-variant-numeric: tabular-nums; }
.amh-widget button.amh-trk-play:hover { background: var(--amh-card2); color: var(--amh-fg); }
.amh-widget .amh-trk .amh-n-eq { display: none; }
.amh-widget .amh-trk.amh-on.amh-is-playing .amh-n { display: none; }
.amh-widget .amh-trk.amh-on.amh-is-playing .amh-n-eq { display: inline-flex; }
.amh-widget .amh-trk-c,
.amh-widget .amh-trk > .amh-ph { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; font-size: 14px; }
.amh-widget .amh-trk-meta { min-width: 0; }
.amh-widget .amh-trk-meta b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-widget .amh-trk-meta small { display: block; color: var(--amh-mut); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-widget .amh-tdur { color: var(--amh-mut); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.amh-widget .amh-buy { display: inline-flex; align-items: center; border-radius: 20px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; background: var(--amh-fg); color: var(--amh-bg); }
.amh-widget .amh-buy:hover { background: var(--amh-accent); color: var(--amh-on-accent); }

/* ============ Music ============ */
.amh-widget .amh-mus-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.amh-widget .amh-mus-h { font-size: 18px; font-weight: 800; }
.amh-widget .amh-mus-src { font-size: 12.5px; }
.amh-widget .amh-mus-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.amh-widget .amh-mus-body.amh-has-player { grid-template-columns: minmax(0, 1fr) 320px; }
.amh-widget .amh-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.amh-widget .amh-citem { min-width: 0; }
.amh-widget .amh-citem-t { display: block; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-widget a.amh-citem-t:hover { color: var(--amh-accent-text); }
.amh-widget .amh-citem small { display: block; color: var(--amh-mut); font-size: 12px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-widget .amh-citem.amh-on .amh-cover { box-shadow: 0 0 0 2px var(--amh-accent); }
/* layouts */
.amh-widget.amh-layout-card .amh-cgrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.amh-widget.amh-layout-card .amh-citem { background: var(--amh-card); border: 1px solid var(--amh-line); border-radius: var(--amh-radius); padding: 10px; }
.amh-widget.amh-layout-list .amh-cgrid { grid-template-columns: 1fr; gap: 6px; }
.amh-widget.amh-layout-list .amh-citem { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px; border-radius: 10px; }
.amh-widget.amh-layout-list .amh-citem:hover { background: var(--amh-card); }
.amh-widget.amh-layout-list .amh-citem .amh-cover { margin: 0; }
.amh-widget.amh-layout-list .amh-citem small { margin: 0; }
.amh-widget.amh-layout-list .amh-cover-play,
.amh-widget.amh-layout-compact .amh-cover-play { right: 50%; bottom: 50%; transform: translate(50%, 50%) scale(.75); }
.amh-widget.amh-layout-compact .amh-cgrid { grid-template-columns: 1fr; gap: 0; }
.amh-widget.amh-layout-compact .amh-citem { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--amh-line); }
.amh-widget.amh-layout-compact .amh-citem .amh-cover { margin: 0; border-radius: 4px; }
.amh-widget.amh-layout-compact .amh-citem small { display: none; }
.amh-widget.amh-layout-compact .amh-box { padding: 14px; }

/* lazy embed facade / player */
.amh-widget .amh-embed {
	position: relative; align-self: start; overflow: hidden; color: #fff;
	border-radius: var(--amh-radius); padding: 14px;
	background: linear-gradient(160deg, #3a2a7a, #101016 70%);
	background: linear-gradient(160deg, color-mix(in srgb, var(--amh-accent) 45%, #000), #101016 70%);
}
.amh-widget .amh-embed-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.amh-widget .amh-embed-cov { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.amh-widget .amh-embed-cov img { width: 100%; height: 100%; object-fit: cover; }
.amh-widget .amh-embed-meta { min-width: 0; }
.amh-widget .amh-embed-meta b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.amh-widget .amh-embed-meta small { color: rgba(255, 255, 255, .7); font-size: 12px; }
.amh-widget .amh-embed-plat { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.amh-widget .amh-embed-load { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; text-align: left; transition: background .15s; }
.amh-widget .amh-embed-load:hover { background: rgba(255, 255, 255, .16); }
.amh-widget .amh-embed-load .amh-ibtn { pointer-events: none; }
.amh-widget .amh-embed-note { margin-top: 10px; font-size: 11px; color: rgba(255, 255, 255, .55); }
.amh-widget .amh-embed.amh-is-loaded { padding: 0; background: var(--amh-card); }
.amh-widget .amh-embed iframe { display: block; width: 100%; border: 0; border-radius: var(--amh-radius); background: transparent; }
.amh-widget .amh-embed.amh-is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%) 0 0/200% 100%; animation: amh-shimmer 1.2s linear infinite; pointer-events: none; }
@keyframes amh-shimmer { to { background-position: -200% 0; } }

/* ============ Videos ============ */
.amh-widget .amh-vgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.amh-widget .amh-v { min-width: 0; }
.amh-widget .amh-vthumb { display: block; position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: calc(var(--amh-radius) * .7); margin-bottom: 8px; background: var(--amh-card2); }
.amh-widget .amh-vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.amh-widget .amh-vthumb:hover img { transform: scale(1.03); }
.amh-widget .amh-pbig { position: absolute; inset: 0; margin: auto; width: 54px; height: 38px; border-radius: 10px; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; transition: background .2s; }
.amh-widget .amh-vthumb:hover .amh-pbig,
.amh-widget .amh-vthumb:focus-visible .amh-pbig { background: var(--amh-accent); color: var(--amh-on-accent); }
.amh-widget .amh-v-t { display: block; font-size: 13.5px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.amh-widget .amh-v small { color: var(--amh-mut); font-size: 12px; }
.amh-widget .amh-v-feat { grid-column: span 2; grid-row: span 2; }
.amh-widget .amh-v-feat .amh-v-t { font-size: 16px; }
.amh-widget .amh-v-feat .amh-pbig { width: 72px; height: 50px; }
.amh-widget .amh-v-foot { display: flex; gap: 8px; margin-top: 16px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.amh-widget.amh-layout-card .amh-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.amh-widget.amh-layout-list .amh-vgrid,
.amh-widget.amh-layout-compact .amh-vgrid { grid-template-columns: 1fr; }
.amh-widget.amh-layout-compact .amh-v { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.amh-widget.amh-layout-compact .amh-vthumb { grid-row: span 2; margin: 0; }

/* ============ Custom playlist ============ */
.amh-widget .amh-cpl { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
.amh-widget .amh-cpl-cov { width: 100%; aspect-ratio: 1; border-radius: calc(var(--amh-radius) * .6); overflow: hidden; background: var(--amh-card2); margin-bottom: 12px; }
.amh-widget .amh-cpl-cov img { width: 100%; height: 100%; object-fit: cover; }
.amh-widget .amh-cpl-info { min-width: 0; }
.amh-widget .amh-cpl-t { display: block; font-size: 18px; margin-top: 4px; overflow-wrap: anywhere; }
.amh-widget .amh-cpl-a { display: block; }
.amh-widget .amh-wave { display: flex; align-items: center; gap: 2px; height: 46px; margin: 14px 0 6px; cursor: pointer; touch-action: none; border-radius: 4px; }
.amh-widget .amh-wave i { flex: 1; min-width: 2px; background: var(--amh-card2); border-radius: 2px; transition: background .2s; }
.amh-widget .amh-wave i.amh-on { background: var(--amh-accent); }
.amh-widget .amh-times { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--amh-mut); font-variant-numeric: tabular-nums; }
.amh-widget .amh-transport { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 10px; }
.amh-widget .amh-cpl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.amh-widget .amh-cpl-head b { font-size: 16px; }
.amh-widget .amh-cpl-head .amh-mut { font-size: 12px; }
.amh-widget.amh-layout-compact .amh-cpl { grid-template-columns: 1fr; }
.amh-widget.amh-layout-compact .amh-cpl-now { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.amh-widget.amh-layout-compact .amh-cpl-cov { margin: 0; }
.amh-widget.amh-layout-compact .amh-wave,
.amh-widget.amh-layout-compact .amh-times,
.amh-widget.amh-layout-compact .amh-transport { grid-column: 1 / -1; }
.amh-widget.amh-layout-compact .amh-cpl-head { display: none; }
.amh-widget.amh-layout-compact .amh-trk-c { display: none; }
.amh-widget.amh-layout-compact .amh-trk { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
.amh-widget.amh-layout-grid .amh-cpl,
.amh-widget.amh-layout-card .amh-cpl { grid-template-columns: 300px minmax(0, 1fr); }

/* ============ Responsive (by the widget's own width) ============ */
@container amh (max-width: 760px) {
	.amh-art { grid-template-columns: 1fr !important; }
	.amh-art-media { max-width: 200px; }
	.amh-art-name { font-size: 28px !important; }
	.amh-mus-body.amh-has-player { grid-template-columns: 1fr !important; }
	.amh-cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
	.amh-vgrid { grid-template-columns: 1fr !important; }
	.amh-v-feat { grid-column: auto !important; grid-row: auto !important; }
	.amh-cpl { grid-template-columns: 1fr !important; }
	.amh-cpl-now { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
	.amh-cpl-cov { margin: 0 !important; }
	.amh-wave, .amh-times, .amh-transport { grid-column: 1 / -1; }
	.amh-trk { grid-template-columns: 28px 36px minmax(0, 1fr) auto !important; gap: 8px !important; }
	.amh-trk .amh-tdur { display: none; }
	.amh-trk .amh-trk-c, .amh-trk > .amh-ph { width: 36px !important; height: 36px !important; }
	.amh-box { padding: 16px; }
}
@container amh (max-width: 420px) {
	.amh-box { padding: 12px; }
	.amh-trk { grid-template-columns: 28px minmax(0, 1fr) auto !important; }
	.amh-trk .amh-trk-c, .amh-trk > .amh-ph { display: none; }
	.amh-npc { grid-template-columns: auto 1fr !important; }
	.amh-npc-share { display: none; }
	.amh-layout-list .amh-cgrid, .amh-layout-compact .amh-cgrid { grid-template-columns: 1fr !important; }
}
/* list / compact stay single-column at every width */
.amh-widget.amh-layout-list .amh-cgrid,
.amh-widget.amh-layout-compact .amh-cgrid { grid-template-columns: 1fr !important; }

/* footer on small screens */
@media (max-width: 640px) {
	#amh-np-footer { left: 8px; right: 8px; bottom: 8px; }
	#amh-np-footer .amh-np-inner { gap: 10px; padding: 8px 10px 12px 8px; }
	#amh-np-footer .amh-np-cov { width: 44px; height: 44px; }
	#amh-np-footer .amh-np-t { font-size: 14px; }
	#amh-np-footer .amh-listen-l,
	#amh-np-footer .amh-np-listen .amh-chip:nth-of-type(n+4),
	#amh-np-footer .amh-np-time { display: none; }
	#amh-np-footer .amh-np-ctrl [data-amh-pl="prev"] { display: none; }
	#amh-np-footer .amh-ibtn { width: 32px; height: 32px; }
	#amh-np-footer.amh-np-min { right: 8px; }
	html.amh-np-on body { padding-bottom: 80px; }
}
@media (max-width: 420px) {
	#amh-np-footer .amh-np-listen { display: none; }
}

/* ============ Modals (share sheet, video lightbox) — built by amh.js ============ */
.amh-modal {
	position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px;
	background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	--amh-bg: #16161e; --amh-card: #20202a; --amh-card2: #2a2a35; --amh-fg: #f2f2f7; --amh-mut: #9a9aae; --amh-line: rgba(255, 255, 255, .1);
}
.amh-modal[hidden] { display: none !important; }
.amh-modal-panel { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--amh-bg); color: var(--amh-fg); border: 1px solid var(--amh-line); border-radius: 22px; padding: 20px; box-shadow: 0 30px 80px #000; animation: amh-pop .2s ease; }
@keyframes amh-pop { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.amh-modal .amh-sheet-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.amh-modal .amh-sheet-cov { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; overflow: hidden; background: var(--amh-card2); }
.amh-modal .amh-sheet-cov img { width: 100%; height: 100%; object-fit: cover; }
.amh-modal .amh-sheet-h > div { min-width: 0; flex: 1; }
.amh-modal .amh-sheet-h b,
.amh-modal .amh-modal-title { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-modal .amh-sheet-h small { display: block; color: var(--amh-mut); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amh-modal .amh-share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amh-modal .amh-sopt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; background: var(--amh-card); border: 1px solid var(--amh-line); border-radius: 14px; color: #e6e6ee; font-size: 12px; font-weight: 600; text-align: center; }
.amh-modal .amh-sopt:hover { border-color: var(--amh-accent); }
.amh-modal .amh-si { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 800 15px/1 system-ui, sans-serif; color: #fff; background: #3a3a48; }
.amh-modal .amh-share-link { display: flex; gap: 6px; margin-top: 14px; padding: 6px 6px 6px 12px; align-items: center; background: #0d0d13; border: 1px solid var(--amh-line); border-radius: 12px; }
.amh-modal .amh-share-link input { flex: 1; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0; margin: 0; color: #c9c9d6; font: 12.5px ui-monospace, Consolas, monospace; outline: 0; height: auto; }
.amh-modal .amh-share-link button { background: var(--amh-accent); color: var(--amh-on-accent); border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 12px; }
.amh-modal .amh-lightbox { width: min(960px, 100%); padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
.amh-modal .amh-lb-player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--amh-line); }
.amh-modal .amh-lb-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.amh-modal .amh-lb-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #fff; }
.amh-modal .amh-lb-meta .amh-modal-title { flex: 1; font-size: 16px; }
.amh-modal .amh-lb-meta a { font-size: 12px; color: var(--amh-mut); text-decoration: underline; white-space: nowrap; }
.amh-modal .amh-toolbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--amh-line); border-radius: 30px; padding: 7px 12px; font-size: 12px; font-weight: 600; color: #fff; }
.amh-modal .amh-toolbtn:hover { border-color: var(--amh-accent); }
.amh-modal .amh-toolbtn .amh-icon { width: 13px; height: 13px; }
html.amh-modal-open,
html.amh-modal-open body { overflow: hidden; }

/* toast + screen-reader helpers */
.amh-toast { position: fixed; left: 50%; top: 24px; z-index: 100002; transform: translate(-50%, -8px); background: #7c5cff; color: #fff; font: 600 12.5px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 8px 14px; border-radius: 20px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); max-width: calc(100vw - 32px); }
.amh-toast.amh-on { opacity: 1; transform: translate(-50%, 0); }
.amh-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
	.amh-eq i { animation: none !important; height: 60%; }
	.amh-eq i:nth-child(2) { height: 90%; }
	.amh-eq i:nth-child(3) { height: 45%; }
	.amh-eq.amh-is-stopped i { height: 25%; }
	.amh-widget *,
	#amh-np-footer,
	#amh-np-footer *,
	.amh-modal *,
	.amh-toast { transition: none !important; animation: none !important; }
	html.amh-loading::before { animation: none; background: #7c5cff; opacity: .6; }
}

@media print {
	#amh-np-footer, .amh-modal, .amh-toast { display: none !important; }
	html.amh-np-on body { padding-bottom: 0; }
}
