/* Variables */
:root {
	--size: 12px;
	--border: 2px;

	--text: #323232;
	--body: #F2F2F7;
	--box: #FCFCFC;

	--overlay: #F2F2F799;

	--string: #E6E6EB;
	--fret: #D9D9DE;

	--selection: #9EA3BA;

	--dim: #F2F2F7;
	--dimHover: #E1E1EF;
	--dimActive: #CFCFE8;

	--positive: #3F4873;
	--positiveHover: #46528C;
	--positiveActive: #4B5AA6;

	--negative: #802050;
	--negativeHover: #991F5C;
	--negativeActive: #B31B67;

	--white: #EEEEEE;

	--hoverUncolored: #7F7F7F14;
	--activeUncolored: #7F7F7F28;
}
@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;

		--text: var(--white);
		--body: #19191F;
		--box: #131317;

		--overlay: #19191F99;

		--string: #23232B;
		--fret: #2D2D38;

		--selection: #2A2F47;

		--dim: #19191F;
		--dimHover: #22222f;
		--dimActive: #2A2A41;
	}
}



/* Fonts */
@font-face {
	font-family: 'Cinzel';
	src: url('/music-blanket/assets/cinzelRegular.woff2') format('woff2');
	font-style: normal;
	font-weight: 400;
}
@font-face {
	font-family: 'Roboto';
	src: url('/music-blanket/assets/robotoBlack.woff2') format('woff2');
	font-style: normal;
	font-weight: 900;
}
@font-face {
	font-family: 'Roboto Slab';
	src: url('/music-blanket/assets/robotoSlabRegular.woff2') format('woff2');
	font-style: normal;
	font-weight: 400;
}



/* General */
html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow-x: hidden;
}
html {
	font-size: var(--size);
	display: flex;
	justify-content: center;
	background: var(--body);
}
body,
button,
input {
	font-size: 1.5rem;
	color: var(--text);
	font-family: 'Roboto Slab';
}
section {
	display: flex;
	flex-direction: column;
	max-width: 100vw;
	min-height: calc(100vh - 6rem);
	margin-bottom: 6rem;
	align-items: center;
}
section.noFooter {
	min-height: 100vh;
	margin-bottom: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: unset;
	margin: 0;
}
a,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
section {
	outline: none;
}
h1 {
	font-family: 'Cinzel';
	font-size: 3rem;
}
p,
ul {
	margin: 0;
}
p:not(:first-child),
ul:not(:first-child) {
	margin-top: 1rem;
}
ul {
	padding-left: 1.5rem;
}
input,
.button {
	padding: 0.375rem 1.5rem;
	box-sizing: border-box;
	width: 100%;
}
input {
	background: var(--body);
	border: none;
	outline: none;
	border-left: 0.5rem solid var(--body);
	padding-left: 1rem;
}
input.invalid {
	border-left-color: var(--negative);
}
input:-webkit-autofill {
	-webkit-text-fill-color: var(--text);
	box-shadow: 0 0 0 10rem var(--body) inset;
}
input:not(:first-child),
.button:not(:first-child) {
	margin-top: 2rem;
}
button {
	cursor: pointer;
	outline: none;
	background: transparent;
	border: none;
	padding: 0;
	transition: background-color 0.25s;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
button:hover,
a.fret:hover,
.tool:hover {
	background: var(--hoverUncolored);
}
button:active,
a.fret:active,
.tool:active {
	background: var(--activeUncolored);
}
.button {
	display: block;
	color: var(--white);
	background: var(--positive);
	position: relative;
	text-decoration: none;
}
.button:hover {
	background: var(--positiveHover);
}
.button:active {
	background: var(--positiveActive);
}
.button.negative {
	background: var(--negative);
}
.button.negative:hover {
	background: var(--negativeHover);
}
.button.negative:active {
	background: var(--negativeActive);
}
.tool:focus-visible::before,
.button:focus-visible::before,
a.sheet:focus-visible::before {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
}
.button::before {
	background: var(--white);
}
a.sheet::before,
.tool::before {
	background: var(--positive);
}
.tool::before {
	width: 100%;
	height: 0.5rem;
}
.button::before,
a.sheet::before {
	width: 0.5rem;
	height: 100%;
}
.dimButton {
	color: var(--text);
	background: var(--dim);
}
.dimButton:hover {
	background: var(--dimHover);
}
.dimButton:active {
	background: var(--dimActive);
}
.wideBox {
	width: 103.25rem;
	max-width: calc(100vw - 8rem);
	background: var(--box);
	margin: 2rem;
	margin-bottom: 0;
	padding: 2rem;
}
.narrowBox {
	width: calc(100% - 4rem);
	max-width: 23rem;
	padding: 2rem;
	margin-top: 0;
	margin-right: 0;
	margin-left: 0;
}
::selection {
	background: var(--selection);
}
* {
	scrollbar-color: var(--hoverUncolored) transparent;
}
::-webkit-scrollbar {
	width: 1.5rem;
	height: 1.5rem;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: var(--hoverUncolored);
}
::-webkit-scrollbar-thumb:hover {
	background: var(--activeUncolored);
}
.hidden {
	display: none !important;
}
.center {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.hCenter {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.stretchWidth {
	width: 100%;
}
.stretchHeight {
	flex: 1;
}
.height100 {
	height: 100%;
}
#banner {
	z-index: 3;
	position: fixed;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	min-height: unset;
	margin: 0;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	height: 4rem;
	padding-top: 0;
	padding-bottom: 0;
}
#bannerText {
	margin-left: 1rem;
}
#banner.error {
	background: var(--negative);
}
.popup {
	text-align: center;
	position: absolute;
	background: var(--box);
	min-height: unset;
	margin: 0;
	padding: 2.5rem;
	width: calc(100% - 5rem);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 4;
}
.popup, #tools {
	box-shadow: 0 0 0 0.25rem var(--body);
}
#loader svg {
	padding: 1rem;
	width: 3rem;
	fill: var(--text);
}
.overlay {
	position: absolute;
	display: flex;
	width: 100vw;
	min-height: 100vh;
	z-index: 2;
	top: 0;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	background: var(--overlay);
}
.overlay > * {
	cursor: auto;
}



/* Home */
.pageHome {
	text-align: center;
}
.pageHome > .narrowBox {
	padding-top: 1.125rem;
}
a.sheet {
	text-decoration: none;
	color: unset;
	transition: all 0.25s;
}
a.sheet:hover {
	box-shadow: 0 0 0 0.5rem var(--box);
}
a.sheet:active {
	box-shadow: 0 0 0 1rem var(--box);
}
a > .sheetTitle {
	pointer-events: none;
}



/* Sheet */
.sheet {
	overflow: overlay auto;
	position: relative;
}
.sheetTitle {
	font-size: 2rem;
	text-align: center;
	background: none;
	border-left: none;
}
.lines {
	position: relative;
	display: flex;
	flex-direction: column;
	width: fit-content;
}
/* Print guide */
.lines.print::after {
	content: '';
	position: absolute;
	top: 0;
	left: 104rem;
	height: 100%;
	border-left: var(--border) solid var(--hoverUncolored);
}
/* Sheet line */
.line {
	display: flex;
	width: fit-content;
	position: relative;
	margin-top: 4rem;
}
.sheetTitle {
	margin-bottom: 2rem;
}
.line:first-of-type {
	margin-top: 0;
}
/* Thick bar */
.line:first-of-type .measure:first-child::before,
.beginRepeat::before,
.line:last-child .measure:last-child::after,
.endRepeat::after {
	content: '';
	display: block;
	position: absolute;
	width: 0.75rem;
	height: 10rem;
}
.line:first-of-type .measure:first-child::before,
.beginRepeat::before {
	left: -1px;
	border-left: 0.5rem solid var(--text);
	border-right: var(--border) solid var(--text);
}
.line:last-child .measure:last-child::after,
.endRepeat::after {
	right: -1px;
	border-left: var(--border) solid var(--text);
	border-right: 0.5rem solid var(--text);
}
/* Repeat dots */
.beginRepeat .column:first-child::after,
.endRepeat .column:last-child::after {
	content: '. .';
	font-size: 5rem;
	width: 0.5em;
	line-height: 4rem;
	margin-top: 0.5rem;
	font-family: serif;
	position: absolute;
	cursor: default;
}
.beginRepeat .column:first-child::after {
	left: 1.5rem;
	text-align: left;
}
.endRepeat .column:last-child::after {
	right: 1.5rem;
	text-align: right;
}
/* Measure */
.measure {
	display: flex;
	flex: 1;
	border-top: var(--border) solid var(--text);
	border-left: var(--border) solid var(--text);
	height: 10rem;
	background: repeating-linear-gradient( 0deg, var(--text), var(--text) var(--border), transparent var(--border), transparent 2rem );
	padding: 0 3.5rem 0 1.5rem;
	position: relative;
}
.measure:last-child {
	border-right: var(--border) solid var(--text);
}
/* Column */
.column {
	display: grid;
	margin-top: -1rem;
	margin-left: 2rem;
	user-select: none;
	cursor: pointer;
}
.column::before {
	content: '';
	position: absolute;
	top: -2rem;
	margin-left: 0.5rem;
	border-left: 0.5rem solid transparent;
	border-right: 0.5rem solid transparent;
	border-top: 0.75rem solid var(--text);
	opacity: 0;
	transition: background-color 0.25s;
	cursor: default;
}
.column:hover::before,
#cursor:active::before {
	opacity: 0.5;
}
.column:active::before,
#cursor::before {
	opacity: 1;
}
.column span {
	width: 2rem;
	height: 2rem;
	line-height: 2rem;
	text-align: center;
}
.column span,
.fret {
	font-family: 'Roboto';
	font-weight: 900;
}
.column span:not(:empty) {
	background: var(--box);
}
.column.selected span,
.column span.selected {
	background: var(--selection);
}



/* Edit sheet */
#fretboard {
	overflow: overlay auto;
}
#fakeString {
	user-select: none;
	margin-top: -1rem;
	margin-bottom: 1rem;
}
#strings {
	background-color: var(--body);
	background-image: linear-gradient(0deg, transparent 22.92%, var(--string) 22.92%, var(--string) 27.08%, transparent 27.08%, transparent 50%, transparent 50%, transparent 72.92%, var(--string) 72.92%, var(--string) 77.08%, transparent 77.08%, transparent 100%);
	background-size: 8rem 8rem;
}
#fakeString, #strings {
	width: max-content;
}
#fakeString .fret {
	height: unset;
}
.fret,
.tool {
	width: 4.125rem;
	height: 4rem;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	flex: none;
}
.string .fret {
	border-right: 3px solid var(--fret);
}
.string .fret:first-child {
	border-right: 0.5rem solid var(--text);
}
.string .fret:last-child {
	border-right: none;
}



/* Toolbar */
#tools {
	z-index: 1;
	max-width: 100vw;
	padding: 0 2rem;
	display: flex;
	justify-content: space-between;
	overflow: overlay auto;
	position: fixed;
	margin: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	background: var(--box);
}
.tool {
	position: relative;
}
.tool svg {
	height: 1.5rem;
	fill: var(--text);
	pointer-events: none;
}
#pathPause {
	display: none;
}



/* Printing */
@media print {
	/* Variables */
	:root {
		--size: 6px;
		--border: 1px;

		--text: #000;
		--body: #fff;
		--box: #fff;
	}

	/* General */
	@page {
		margin: 0.25in 1in;
	}

	/* Sheet */
	.wideBox {
		box-shadow: none;
		margin: 0;
		padding: 0;
		max-width: unset;
		width: 100vw;
	}
	.sheetTitle {
		margin-bottom: 0.2in;
	}
	/* Print guide */
	.lines.print::after {
		display: none;
	}
	/* Sheet line */
	.line {
		width: 100%;
		margin-top: 2.25rem;
		padding: 0.55rem 0;
		break-inside: avoid;
	}
	/* Measure */
	.measure {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
	/* Column arrow */
	.column::before {
		display: none;
	}

	/* Edit sheet */
	#fretboard,
	#tools {
		display: none;
	}
}
