@font-face {
	font-family: Barlow;
	src: url("music.txt.woff") format("woff");
}

@font-face {
	font-family: BarlowSC;
	src: url("music.txtsc.woff") format("woff");
}

@font-face {
	font-family: Foundation;
	src: url("music.woff") format("woff");
}

:root {
	--bg: #10100f;
	--bg-body: #1a1a1a;
	--bg-button-hv: #1a1a1a;
	--bg-dim: #000;
	--bg-image: url(music.theme.svg);
	--bg-menu: #121211;
	--bg-player-fix: #121211;
	--bg-scroll: transparent;
	--bg-splash: #212121;
	--bg-thumb: #eee;
	--bg-thumb-hv: #ddd;
	--bg-toast: var(--bg);
	--bg-toast-error: #911d1d;
	--bg-trash: #10100faa;
	--border: #1e1e1e;
	--border-cover: #3c3c3c;
	--box-shadow: #10100f;
	--focus: #1d91f0;
	--focus-dim: #1a6eac;
	--scroll: #292929;
	--scroll-hv: #3c3c3c;
	--text: #b4b4b4;
	--text-dim: #696969;
	--text-li-parent: #4c4c4c;
	--text-locked: #5a5a5a;
}

::selection {
	color: #fff;
	background-color: var(--focus);
}

::-webkit-scrollbar { width: 10px }
::-webkit-scrollbar-track { background: var(--bg-scroll); border-radius: 2px }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 2px }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hv) }
::-webkit-scrollbar-corner { background: none }
::-webkit-resizer { background: var(--scroll) }

* {
	scrollbar-color: var(--scroll) var(--bg-scroll);
	scrollbar-width: thin;

	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
	*:active, *:focus, *:hover { outline: none }

html.touch body {
	font-family: BarlowSC, "Segoe UI", sans-serif;
	font-size: 1.1em;
	word-spacing: 1px;
}
	html.touch button, html.touch input, html.touch li {
		user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		-webkit-user-select: none;
		-webkit-touch-callout: none;
		-webkit-tap-highlight-color: transparent;
	}
	html.touch input, html.touch li { padding: .4em 0 }
	html.touch input[type=range] { width: 18em }
	html.touch u { text-decoration: none }
	html.touch #current { line-height: 1.25em }
	html.touch #playlist {
		overflow-x: auto;
		white-space: nowrap;
	}
	html.touch *::-webkit-scrollbar { width: 4px !important }
	html.touch #tree ul { margin-left: .5em }
	html.touch .toolbar.hidden { visibility: visible }

html.hide > body > div,
html.hide > body > div:before {
	opacity: 0;
	pointer-events: none;
}

html.dim > body { background: var(--bg-dim) }
	html.dim > body > div,
	html.dim > body > div:before { opacity: .25 }

body, button, input {
	font-family: Barlow, "Segoe UI", sans-serif;
	line-height: 1.25em;
	word-spacing: .1em;
	letter-spacing: -.04em;
	font-variant-numeric: tabular-nums;
	color: var(--text);
}

body {
	background: var(--bg-body);
	transition: background .2s;
}

body > div {
	margin: .5em 2em;
	padding: .25em;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	cursor: default;
}
	body > div:before {
		position: absolute;
		left: .75em;
		margin-top: -.25em;
	}
	body > div, body > div * { transition: background .4s, border-color .4s, opacity .4s }
		body > div li { transition: background .4s, opacity .4s }

body.locked #stop, body.locked #previous, body.locked #next,
body.locked #enqueue, body.locked #random, body.locked #crossfade, body.locked #playlistbtn {
	color: var(--text-locked);
	pointer-events: none;
}
	body.locked #seek { pointer-events: none }
	body.locked #enqueue:before { content: "\f126" }
	body.locked #playlistdiv #trash { display: none !important }
body:not(.locked) #playlistdiv:hover #trash,
body:not(.locked) #library:hover .toolbar { visibility: visible }

button {
	display: inline-block;
	padding: .5em .6em;
	font-size: .95em;
	background: none;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: background .1s ease-in;
}
	button:before { font-size: 1.05em }
	button:hover, .menu > button:focus { background: var(--bg-button-hv) }
	button::-moz-focus-inner { border: none }

button b {
	margin-left: .5em;
	padding: 0 .3em .2em .2em;
	font-size: .8em;
	font-weight: normal;
	color: var(--text-dim);
	vertical-align: top;
	border: 1px solid var(--border);
	border-radius: 3px;
}

input, select {
	width: 29.5em;
	padding: .1em;
	background: var(--bg);
	font-size: .8em;
	border: none;
	border-bottom: 1px solid var(--text);
}

input[type=range] {
	width: 14em;
	max-width: 90%;
	height: 1em;
	margin-top: 1px;
	background: transparent;
	vertical-align: text-top;
	opacity: .5;
	border: none;
	outline: none !important;
	cursor: pointer;
	-moz-appearance: none;
	-webkit-appearance: none;
}
	input[type=range]::-moz-focus-outer { border: none }
	input[type=range]::-moz-range-track {
		height: 1px;
		background: var(--text);
	}
	input[type=range]::-moz-range-thumb {
		width: 12px;
		height: 12px;
		background: var(--bg-thumb);
		border: 1px solid var(--text);
		border-radius: 50%;
		-moz-appearance: none;
	}
		input[type=range]:hover::-moz-range-thumb { background: var(--bg-thumb-hv) }
	input[type=range]::-webkit-slider-runnable-track {
		height: 1px;
		background: var(--text);
	}
	input[type=range]::-webkit-slider-thumb {
		width: 1em;
		height: 1em;
		margin-top: -.5em;
		background: var(--bg-thumb);
		border: 1px solid var(--text);
		border-radius: 50%;
		-webkit-appearance: none;
	}
		input[type=range]:hover::-webkit-slider-thumb { background: var(--bg-thumb-hv) }
	input[type=range]::-ms-thumb { margin: 0 }
	input[type=range]::-ms-tooltip { display: none }
	input[type=range]::-ms-track {
		height: 1px;
		background: var(--text);
		border: none;
	}
	input#volumeslider {
		width: unset;
		margin: calc(.3em + 1px) .3em .3em .3em;
	}
		input#volumeslider::-webkit-slider-runnable-track { margin-top: 0px }

span { margin-left: .25em }

u { text-decoration: underline solid var(--text-dim) }

ul {
	margin-left: 0;
	list-style: none;
}
	#tree ul {
		display: none;
		margin-left: 1.25em;
	}

li.dim { color: var(--text-dim) !important }

li.dim:hover, li.dim:hover:before,
li.dim:focus, li.dim:focus:before,
li.parent:hover, li.parent:hover:before,
li.parent:focus, li.parent:focus:before,
li:hover .artist, li:focus .artist { color: var(--focus-dim) !important }

li:hover, li:hover:before,
li:focus, li:focus:before,
li.match:hover, li.match:hover:before,
li.match:focus, li.match:focus:before { color: var(--focus) !important }

li:hover, li:hover:before,
li span.artist, li span.artist:hover,
li.parent:hover, li.parent:hover:before { transition: color .05s ease-in }

li#last:before { visibility: hidden }

#splash {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	width: 150px;
	height: 150px;
	margin: auto;
	font-size: 150px;
	color: var(--bg-splash);
	border: none;
	z-index: -1;
	animation: 4s fade;
}
	@keyframes fade { from { opacity: 0 }}

#player {
	white-space: nowrap;
	overflow: hidden;
}
	#player > * {
		display: inline-block;
		vertical-align: middle;
		transition: max-width .4s, max-height .4s, min-width .4s, min-height .4s, opacity .4s, border-color .4s;
	}

#cover {
	min-width: 7em;
	max-width: 7em;
	min-height: 7em;
	max-height: 7em;
	opacity: .7;
	border: 1px solid var(--border-cover);
	border-radius: 3px;
	cursor: zoom-in;
}
	#cover:hover, #cover.nofade { opacity: 1 }
	#player.big:not(.fix) > #cover {
		min-width: 300px;
		min-height: 300px;
		max-width: 300px;
		max-height: 300px;
	}
#player.big:not(.fix) #current { width: calc(100% - 300px) }
#player.full:not(.fix) #cover, #player.full:not(.fix) #current, #player.full:not(.fix) #current > * {
	display: block;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	max-height: 100%;
	margin: 0 auto;
	text-align: center;
}
	#player.full #cover { cursor: zoom-out }
	#player.full:not(.fix) #current {
		width: unset;
		margin-top: .25em;
	}
	#player.full #seek { margin-bottom: .25em }

#current {
	width: calc(100% - 7em);
	padding: .2em .25em;
}
	#current > div {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

#title {
	font-weight: bold;
	letter-spacing: -.02em;
}

#time {
	display: inline-block;
	color: var(--text-dim);
}

#controls { margin-bottom: 1px }
	#controls > button:before { margin: .25em }

#toast {
	position: fixed;
	top: 1em;
	right: 1em;
	padding: 1em;
	background: var(--bg-toast) !important;
	box-shadow: 0 0 2px 2px var(--border);
	cursor: default;
	z-index: 3;
}
	#toast.error { background: var(--bg-toast-error) !important }
	#toast.hide { display: none }

html:not(.dim) #player.fix {
	position: fixed;
	top: -1px;
	left: 0;
	right: 0;
	margin: 0;
	box-shadow: 0 0 2px 1px var(--box-shadow);
	animation: .4s fix;
	z-index: 2;
}
	@keyframes fix { from { transform: translateY(-100%) }}
	#player.fix #cover {
		min-width: 5.25em;
		max-width: 5.25em;
		min-height: 5.25em;
		max-height: 5.25em;
		cursor: row-resize;
		transition: opacity .4s;
	}
	#player.fix #current {
		width: calc(100% - 5.5em);
		padding: 0 0 0 .25em;
	}
	#player.fix:before, #player.fix #time, #player.fix #seek { display: none }
	#player.fix { background: var(--bg-player-fix) }

#options > div > button { padding-right: .75em }
#options button:before, #trash button:before, #popup > button:before,
#toast:before, li:before { margin-right: .25em }

#playlistoptions, #shares {
		max-height: 0;
		overflow-y: hidden;
		transition: margin-top .2s, padding-top .2s, max-height .2s ease-out;
}
	#options.playlistbtn #playlistoptions, #options.share #shares {
		max-height: 11em;
		margin-top: .25em;
		padding-top: .25em;
		border-top: 1px solid var(--border);
		transition: max-height .2s ease-in;
	}

#playlistsdiv, #afterdiv { display: inline-block }

#shares > .sharediv { max-width: 33em }
#shares	.uri { flex-grow: 1 }
#shares button:before { margin-right: 0 }
#shares input {
	margin: 0 .25em;
	direction: rtl;
}

#playlistdiv > div { position: relative }

#trash {
	position: absolute;
	top: 0;
	right: 0;
	background: var(--bg-trash);
	box-shadow: -1px 1px 2px 1px var(--bg-trash);
	z-index: 1;
}
	#trash:before {
		padding: .4em;
		font-size: 1.1em;
	}
		#trash.over:before, #trash:hover:before { display: none }
	#trash:not(:hover) button { display: none }
	#trash:hover { background: var(--bg) }
	#trash.drag {
		height: 100%;
		padding: .5em;
		border-left: 1px solid var(--border);
		transition: background .4s, opacity .4s;
	}
	#trash.drop, #trash.on { color: var(--focus) }

#playlist {
	min-height: 2.137em;
	max-height: 10.25em;
	overflow-y: auto;
	list-style: none;
}
	#playlist.resize {
		min-height: 4.5em;
		max-height: initial;
		resize: vertical;
	}

#playlist li {
	margin-left: 1.25em;
	border-top: 1px solid var(--bg);
	cursor: alias;
}
	#playlist li:before { margin-left: -1.25em }
	#playlist li[error="1"] { color: red }
	#playlist li.over { border-top: 1px dotted var(--focus) }

#filter {
	margin: .1em;
	padding-top: .75em;
}

.spacer { flex-grow: 1 }

#tree {
	display: none;
	margin-left: 1.25em;
	list-style: none;
}
	#library.unfold #tree { display: block }

#tree li { cursor: pointer }
#tree li:before { margin-left: -1.25em }
#tree li:focus { text-decoration: underline solid var(--focus) }
#tree li:focus * { text-decoration: underline solid var(--bg) }
#tree li.dim:focus, #tree li.parent:focus { text-decoration: underline solid var(--focus-dim) !important }
#tree li.open > ul { display: block }
#tree li.parent { color: var(--text-li-parent) }
#tree li.parent .song, #tree li.match,
#tree li:hover > ul, #tree li:focus > ul { color: var(--text) }

#copyleft {
	padding-bottom: .8em;
	font-size: .8em;
	text-align: center;
}
	#copyleft * { color: var(--text-dim) }
		#copyleft *:hover { color: var(--text) }

#logdiv {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	opacity: 1;
	z-index: 2;
}
	#logdiv > div { height: 100% }
	#logdiv .toolbar { justify-content: flex-end }
	#log {
		width: 100%;
		height: calc(100% - 3em);
		margin-top: .25em;
		color: var(--text);
		white-space: pre;
		background: none;
		border: none;
		overflow-y: scroll;
		overscroll-behavior: contain;
	}

#popupdiv {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0;
	background: none;
	border: none;
	opacity: 1;
	pointer-events: auto;
}
	#popup {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		width: 20em;
		max-width: 90%;
		margin: auto;
		padding: .5em;
		background: var(--bg);
		text-align: right;
		border: 1px solid var(--border);
		border-bottom: none;
		border-radius: 4px 4px 0 0;
		box-shadow: 0 0 2px 1px var(--box-shadow);
		animation: .4s popup;
	}
	@keyframes popup { from { transform: translateY(200%) }}
	#popup button { margin: .1em }
	#popup input {
		max-width: calc(100% - 2em);
		margin-bottom: .5em;
	}
	#popup > div { text-align: center }
	#popupicon { margin-top: 1em }
		#popupicon:before { font-size: 3em }

:not(html).hide { display: none }

.title {
	height: 1.25em;
	cursor: alias;
}

.artist, .dim { color: var(--text-dim) }

.toolbar {
	display: flex;
	align-items: center;
}
	.toolbar.hidden { visibility: hidden }

.menu {
	position: absolute;
	background: var(--bg-menu);
	border: 1px solid var(--border);
	border-radius: 3px;
	box-shadow: 0 1px 2px 2px var(--box-shadow);
	z-index: 2;
}
	.menu.delay { animation: .1s fade step-end }
	.menu button {
		display: block;
		width: 100%;
		background: var(--bg-menu);
		text-align: left;
		border-radius: 0;
	}
	.menu p { padding: .5em }

@media (min-width: 541px) {
	body, #player.fix, #player.fix button:hover { background-image: var(--bg-image) }
}

@media (max-width: 480px) {
	body > div { margin: 2px }
	body > div:before { display: none }
}

@media (max-width: 670px) {
	body { font-family: BarlowSC, "Segoe UI", sans-serif }

	#player:not(.fix) #cover, #player:not(.fix) #current, #player:not(.fix) #current > *:not(#seek) {
		display: block;
		min-width: 0;
		min-height: 0;
		max-width: 100%;
		max-height: 100%;
		width: unset !important;
		height: unset;
		margin: 0 auto;
		padding: 0;
		text-align: center;
	}
		#player:not(.fix) #cover { max-height: 10em }
		#current:not(.fix) { margin-top: .25em }
		#player:not(.fix) #seek {
			margin-bottom: .5em;
			padding: .5em;
		}

	#options { text-align: center }
}

*:before {
	display: inline-block;
	width: 1em;
	font-family: Foundation;
	text-align: center;
}

#after:before { content: "\f182" }
#crossfade:before { content: "\f1b2" }
#enqueue:before, .add:before { content: "\f199" }
#library:before { content: "\f17b" }
	#library.unfold #unfold:before { content: '\f10d' }
#lock:before { content: "\f16a" !important }
	#lock.on:before { content: "\f20a" !important }
#logbtn:before { content: "\f1a1" }
#next:before { content: "\f17c" }
#options:before { content: "\f214" }
#player:before { content: "\f153" }
#playlistbtn:before { content: "\f18e" }
#playlistdiv:before { content: "\f103" }
#playpause:before, #playlibrary:before { content: "\f198" }
	#playpause.playing:before { content: "\f191" }
#playlistexport:before { content: "\f188" }
#playlistimport:before { content: "\f17f" }
#playlistload:before { content: "\f180" }
#playlistsave:before { content: "\f184" }
#popup #popupicon:before { content: "\f127" }
	#popup.lockdlg #popupicon:before { content: "\f16a" }
	#popup.savedlg #popupicon:before { content: "\f1ac" }
	#popup.sharedlg #popupicon:before { content: "\f12f" }
	#popup.unlockdlg #popupicon:before { content: "\f20a" }
#previous:before { content: "\f19c" }
#random:before, #randomlibrary:before { content: "\f13a" }
#randomfiltered:before { content: "\f14b" }
#reload:before { content: "\f18d" }
#removesongs:before { content: "\f204" }
#repeatplaylist:not(.on):before { content: "\f1a5"; margin-left: 1px; margin-right: calc(.25em - 1px); transform: scale(-1, 1) }
#share:before { content: "\f1ad" }
#splash:before { content: "\f1ed" }
#stop:before, #stopplayback:before { content: "\f1ef" }
#theme:before { content: "\f134" }
#toast:before { content: "\f217" }
#trash:before { content: "\f204" }
#unfold:before { content: "\f10e" }
#volume:before { content: "\f211" }
	#volume.muted:before { content: "\f210" }

.folder:before { content: "\f150" }
.folder.open:before { content: "\f14e" }
.playing:before { content: "\f198" }
.playlist:before { content: "\f18e" }
.song:not(.playing):before { content: "\f17b"; color: var(--text-dim) }
button#cancel:before, button.clear:before, .close:before { content: "\f217" }
button#ok:before, button.on:before { content: "\f126" !important }
button.clip:before { content: "\f129" !important }
button.download:before { content: "\f143" }
button.filter:before { content: "\f14b" }
button.link:before { content: "\f165" }
button.min:before { content: "\f176" }
button.share:before { content: "\f1a6" }