@font-face {
	font-family: 'Ubuntu';
	src:
		url("fonts/ubuntu-c-webfont.eot") format("eot"),
		url("fonts/ubuntu-c-webfont.woff") format("woff"),
		url("fonts/ubuntu-c-webfont.ttf") format("ttf"),
		url("fonts/ubuntu-c-webfont.svg") format("svg");
}

@font-face{
    font-family: 'Source Sans 3';
    font-weight: 200 900;
    font-style: normal;
    font-stretch: normal;
    src: url('fonts/SourceSans3VF-Upright.ttf.woff2') format('woff2-variations'),
         url('fonts/SourceSans3VF-Upright.ttf.woff') format('woff-variations'),
         url('fonts/SourceSans3VF-Upright.ttf') format('truetype-variations');
}

@font-face{
    font-family: 'Source Sans 3';
    font-weight: 200 900;
    font-style: italic;
    font-stretch: normal;
    src: url('fonts/SourceSans3VF-Italic.ttf.woff2') format('woff2-variations'),
         url('fonts/SourceSans3VF-Italic.ttf.woff') format('woff-variations'),
         url('fonts/SourceSans3VF-Italic.ttf') format('truetype-variations');
}

* {
	font-family: "Source Sans 3", "Ubuntu", sans-serif;
	padding: 0;
	margin: 0;
	border: none;
	border-collapse: collapse;
	box-sizing: border-box;
	-webkit-user-select: none; /* Safari */
	-ms-user-select: none; /* IE 10 and IE 11 */
	user-select: none; /* Standard syntax */
	touch-action: manipulation;

	color:#EFEFEF;

	text-decoration: none;

	-ms-overflow-style: none;  // IE 10+
	overflow: hidden;
    scrollbar-width: none;  // Firefox
}

html {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: var(--bottom);
}

form {
	background-color: var(--form-panel);
}

input[type="range"] {
	touch-action: none;
}

*:focus {
	outline: none;
}

*::-webkit-scrollbar  {
	display: none;
}

h3 {
	font-size: 1.5em;
}

/* SVG icons */
.will-restart {
	color: var(--attention-color);
}

/* Disabled zones */
.instrument-wrapper.muted, .track.repertoire.loading {
	opacity: 0.25;
	pointer-events: none;
}

#settings.repertoire {
	display: none;
}

#settings-more.repertoire {
	opacity: 0;
	pointer-events: none;
}

@keyframes shimmer {
  to {background-position: 0%;}
}

#media-reader-panel.loading::before {
	position: absolute;
	content: "";
  height: 85svh;
  width: 100vw;
  z-index: 9999;
  background: linear-gradient(-45deg, #AAAAAA 40%, #FAFAFA 50%, #AAAAAA 60%);
  background-size: 300%;
  background-position-x: 100%;
  opacity: .3;
  animation: shimmer 2s infinite alternate;
}

/* Form buttons */
input[type="radio"], input[type="checkbox"]  {
	display: none;
}

input[type="radio"]:checked + label {
	background-color: var(--accent-color);
}

label, .click-button, .click-button-secondary {
	font-size: 1em;

	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
}

label {
	background-color: var(--button-color);
	border: 1px solid var(--button-outline);
}

.click-button {
	background-color: var(--click-button);
	border: 1px solid var(--click-button-outline);
}

.click-button-secondary {
	background-color: var(--click-button-secondary);
	border: 1px solid var(--click-button-outline);
}

@media(hover: hover) and (pointer: fine) {
	.track:hover, label:hover, .click-button:hover {
		border: 1px solid var(--accent-color);
		transition: border .25s, background-color .25s;
	}
}

/* Main screen */
body {
	height: 100svh;
	width: min(1280px, 100vw);

	position: relative;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;

	/* overflow: hidden; */
	overscroll-behavior-x: none;
	border: 1px dotted #595959;

	background-color: var(--other-panel);
}

/* Divided in three */
header {
	height: 10%;
	min-height: 60px;
	width: 100%;
	display: flex;
	justify-content: space-evenly;
	align-items: center;

	background-color: var(--other-panel);
	border-bottom: 1px double var(--panel-outline);
}

.go-back {
	animation: pressHere 1s infinite ease-in-out alternate;
}

main {
	height: 85%;
	width: 100%;

	display: grid;
	grid-template-areas:
		"start picker reader settings"
		"tuner .      .      .";

	grid-auto-columns: 100vw;
	grid-auto-rows: 100%;

	overflow-x: scroll;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
}

#help-panel {
	position: absolute;
	top: max(60px, 10%);

	height: min(calc(100% - 90px), 85%);
	width: 100%;
	padding: max(1em, 5%);
	font-size: 1em;

	transform-origin: top;
	transform: scaleY(1);

	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: left;
	gap: 1em;


	background-color: var(--main-panel);
	z-index: 2;
	opacity: .9;
	overflow-y: scroll;

	transition: transform .2s ease-out;
}

#help-panel em {
	font-style: normal;
	font-weight: bold;
}

#help-panel.hidden {
	transform: scaleY(0);
}

#volume-boost {
	font-size: 4em;
	text-align: center;
	background-color: var(--other-panel);
	border: 1px solid var(--side-outline);
}

footer {
	height: 5%;
	min-height: 30px;
	width: 100%;
	font-size: 1em;

	background-color: var(--other-panel);
	border-top: 1px double var(--panel-outline);

	display: flex;
	justify-content: center;
	align-items: center;
}

/* Switchable pages */
@keyframes swipeHint {
	from {transform: translateX(0);}
	2% {transform: translateX(-15%)}
	3% {transform: translateX(-15%);}
	5% {transform: translateX(0);}
	to {transform: translateX(0);}
}

.page-wrapper {
	height: 100%;
	width: min(1281px, 100vw);
	/* width: 100vw; */

	overflow-y: scroll;

	scroll-snap-align: start;
	scroll-snap-stop: always;

	background-color: var(--main-panel);
}

.page-wrapper.hintSwipe {
	animation: swipeHint 6s infinite ease-in-out;
}

/* Header content */
header div {
	font-size: 1.5em;
	width: 20%;
	display: flex;
	justify-content: center;
	align-items: center;

	opacity: .5;
}

header div.hidden, header div.repertoire {
	visibility: hidden;
}

header div.none {
	display: none;
}

header #header-title {
	width: 60%;

	font-size: 2em;

	display: flex;
	justify-content: center;
	align-items: center;
}

/* Media-reader page */
@media (orientation: landscape) {
	#media-reader-panel {
		grid-template-areas:
			"cover  settings"
			"cover  settings"
			"cover  mixer"
			"cover  mixer"
			"cover  mixer"
			"player player"
			"player player"
			"player player";

		grid-auto-rows: minmax(35px, 1fr);
		grid-auto-columns: 1fr;
	}

	#mixer.repertoire {
		grid-row: span 5;
	}
}

@media (orientation: portrait) {
	#media-reader-panel {
		grid-template-areas:
			"cover"
			"cover"
			"cover"
			"cover"
			"cover"
			"cover"
			"cover"
			"settings"
			"settings"
			"mixer"
			"mixer"
			"player"
			"player"
			"player";

		grid-auto-rows: minmax(39px, 1fr);
	}

	#mixer.repertoire {
		grid-row: span 4;
	}
}

#media-reader-panel {
	grid-area: reader;

	display: grid;

	background-color: transparent;
}

#cover {
	grid-area: cover;

	overflow-y: scroll;

	display: flex;
	flex-direction: column-reverse;

	padding: 1em;
	gap: 1em;
}

#settings {
	grid-area: settings;

	display: grid;
	grid-template-rows: repeat(2, 1fr);

	padding: .5em;

	border: 1px solid var(--panel-outline);
	border-radius: 20px 20px 0 0;
	background-color: var(--other-panel);
}

#mixer {
	grid-area: mixer;
	padding: .5em;

	display: grid;
	grid-auto-rows: 45%;

	overflow-y: scroll;

	border: 1px solid var(--panel-outline);
	border-radius: 0 0 20px 20px;
	background-color: var(--other-panel);
}

#mixer.repertoire {
	border-radius: 20px;

	grid-auto-rows: 24%;
}

#player {
	grid-area: player;
	padding: .5em;

	display: grid;
	grid-template-rows: repeat(2, 1fr);

	background-color: var(--main-panel);
	border: 1px solid var(--panel-outline);
	border-radius: 20px;

	z-index: 1;
}

/* Cover and infos */
.displayed-track {
	min-height: 100%;

	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;

	overflow-y: scroll;


	background-image: url(./binding-light.png);
	border: 1px solid var(--side-outline);
	border-radius: 5px;
}

.displayed-track .track-type {
	width: 90%;

	display: flex;
	justify-content: center;
	align-items: center;

	font-size: 110%;
	color: var(--info-text);
	text-shadow: 1px 1px 3px #333333;
}

.displayed-track .track-title {
	width: 90%;

	display: flex;
	flex-direction: column;
	align-items: center;

	text-align: center;
	text-shadow: 1px 1px 3px #333333;
}

.displayed-track .track-infos {
	width: 97.5%;
	display: flex;
	justify-content: space-between;
	text-shadow: 1px 1px 3px #333333;
}

.displayed-track .track-title h4 {
	font-size: 200%;
}

.displayed-track .track-title h5 {
	font-size: 150%;
	font-style: italic;
}

.displayed-track .track-title h5.composer {
	font-size: 100%;
	font-style: italic;
	order: -1;
}

.displayed-track .track-infos h6 {
	font-size: 100%;
	color: var(--info-text);
}

.parameters-infos {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;

	font-size: .8em;
	
}

.parameters-infos div {
	color: var(--side-text);
}

.parameters-infos > div:last-of-type {
	text-align: right;
}

.parameters-infos span {
	font-style: italic;
	color: var(--text-color);
}

/* Settings :
	- quick settings icons
	- tempo slider */
#icons {
	display: grid;
	grid-template-columns: repeat(4, 1fr);

	gap: .5em;

	align-items: center;
}

.icon {
	height: 100%;
}

#icons .button {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;

	font-size: 1.5em;

	background-color: var(--button-color);
	border: 1px solid var(--button-outline);
}

#icons .button.unclickable {
	color: var(--other-panel);
	background: var(--unclickable-button);
}

#icons .button.unclickable.disabled {
	color: transparent;
	background-color: transparent;
	background: var(--disabled-button);
}

#tempo {
	display: grid;
	grid-template-columns: repeat(5, 1fr);

	align-items: center;
}

#tempo-input {
	grid-column: span 4;
}

#tempo-display {
	display: flex;
	justify-content: center;
}


/* Media player :
	- control buttons
	- time seeker */
#controls {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	align-items: center;
}

#seeker {
	display: grid;
	grid-template-rows: repeat(3, 1fr);
}

#seeker.repertoire {
	grid-template-rows: repeat(2, 1fr);
}

/* Control buttons */
#controls div {
	grid-column: span 2;
	height: 60%;

	display: flex;
	align-items: center;
	justify-content: center;

	color: var(--text-color);
}

#controls div:nth-of-type(2) {
	grid-column: span 1;
	height: 100%;
}

/* Time seeker */
#beats-wrapper {
	display: grid;

	background-color: var(--main-panel);
	border: 1px solid var(--panel-outline);
}

#beats-wrapper.repertoire {
	display: none;
}

#beats-wrapper div {
	background-color: var(--measures-color);
}

#beats-wrapper div.first-beat {
	border-left: 1px solid black;
	/* background-color: var(--first-beat); */
}

#beats-wrapper div.played {
	opacity: .5;
}

#beats-wrapper div.upbeat, #beats-wrapper div.end {
	background-color: var(--empty-bar);
}

 #beats-wrapper div.first-beat.end {
 	border-left: 5px solid black;
 }

#measure-numbers {
	display: grid;
}

#measure-numbers span {
	overflow: hidden;
}

/* Mixer */
.instrument-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5em;
}

.instrument-wrapper h2 {
	width: 25%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 100%;

	background-color: var(--accent-color);
	border: 1px solid var(--button-outline);
}

.instrument-wrapper.muted h2 {
	background-color: var(--button-color);
	pointer-events: auto;
}

.volume-wrapper {
	height: 100%;
	flex: 5;

	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
}

#mixer input {
	width: 85%;
}

#mixer span {
	width: 15%;
}

/* Landup page / Start choices : temperament, tuning */
#start-parameters-panel {
	grid-area: start;

	display: grid;
	grid-template-rows: repeat(12, minmax(50px, 1fr));
	font-size: 1.2em;
}

@keyframes pressHere {
	from {box-shadow: inset 0 0 30px transparent;}
	to {box-shadow: inset 0 0 30px red;}
}

#start-tempering.first {
	animation: pressHere 1s infinite ease-in-out alternate;
}

#start-tempering {
	grid-row: span 5;

	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5em;
	padding: 0.5em;
}

#start-tempering h3 {
	grid-column: span 2;
	display: flex;
	justify-content: center;
	align-items: center;
}

#start-equal + label {
	grid-column: span 2;
}

#start-tuning {
	grid-row: span 3;

	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr;
	gap: 0.5em;
	padding: 0.5em;
}

#start-tuning.first, #start-tuner.first, #sampling.first, header div.first {
	opacity: .5;
	pointer-events: none;

	transition: opacity 1s;
}

#start-tuning, #start-tuner, #sampling {
	transition: opacity .5s;
}

#start-tuning h3 {
	grid-column: span 4;
	display: flex;
	justify-content: center;
	align-items: center;
}

#start-tuning-precise {
	grid-column: span 4;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	align-items: center;
}

#start-tuning-precise input {
	grid-column: span 4;
}

#start-tuning-precise span {
	display: flex;
	justify-content: center;
}

#start-tuner {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;

	background-color: var(--click-button);
	border: 1px solid var(--button-outline);
}

#start-tuner svg {
	width: 10%;
	aspect-ratio: 1/1;
}

#sampling {
	grid-row: span 3;

	display: grid;
	grid-template-columns: 1fr;
	gap: 0.5em;
	padding: 0.5em;
}

#sampling h3 {
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Tuner panel */
@media (orientation: landscape) {
	#tuner-panel {
		grid-template-areas:
			"tuning    tuning    tuning    tuning    display   display   display   controls"
			"tuning    tuning    tuning    tuning    display   display   display   controls"
			"tuning    tuning    tuning    tuning    display   display   display   controls"
			"tuning    tuning    tuning    tuning    volume    volume    volume    controls"
			"tempering tempering tempering tempering tempering tempering tempering tempering"
			"tempering tempering tempering tempering tempering tempering tempering tempering"
			"tempering tempering tempering tempering tempering tempering tempering tempering"
			"tempering tempering tempering tempering tempering tempering tempering tempering"
			"tempering tempering tempering tempering tempering tempering tempering tempering";
		grid-auto-columns: 1fr;
	}

	#tuner-tuning {
		grid-template-columns: repeat(2, 1fr);
	}

	#tuner-tuning h3, #tuner-tuning-precise {
		grid-column: span 2;
	}

	#tuner-controls {
		grid-template-rows: repeat(4, 1fr);
	}

	#tuner-controls > *:nth-child(4) {
		order: 1;
	}

	#tuner-controls > *:nth-child(7) {
		order: 2;
	}
}

@media (orientation: portrait) {
	#tuner-panel {
		grid-template-areas:
			"tuning"
			"tuning"
			"tuning"
			"display"
			"display"
			"display"
			"display"
			"volume"
			"controls"
			"tempering"
			"tempering"
			"tempering"
			"tempering"
			"tempering";
	}

	#tuner-tuning {
		grid-template-columns: repeat(4, 1fr);
	}

	#tuner-tuning h3, #tuner-tuning-precise {
		grid-column: span 4;
	}

	#tuner-controls {
		grid-template-columns: repeat(4, 1fr);
	}
}

#tuner-panel {
	grid-area: tuner;
	display: grid;
	grid-auto-rows: minmax(50px, 1fr);

	font-size: 1.2em;
}

#tuner-tuning {
	grid-area: tuning;

	display: grid;
	gap: 0.5em;
	padding: 0.5em;
}

#tuner-tuning h3 {
	display: flex;
	justify-content: center;
	align-items: center;
}

#tuner-tuning-precise {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	align-items: center;
}

#tuner-tuning-precise input {
	grid-column: span 4;
}

#tuner-tuning-precise span {
	display: flex;
	justify-content: center;
}

#tuner-display-wrapper {
	grid-area: display;

	position: relative;
	background-color: var(--other-panel);
	border: 1px solid var(--panel-outline);

	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	
	opacity: .5;
}

.graduations {
	height: 10%;
	width: 100%;

	display: grid;
	grid-template-columns: repeat(11, 1fr);
	text-align: center;

	z-index: 2;
}

.graduations span {
	font-size: min(10px, 1em);
	color: var(--side-text);
}

#tuner-display {
	position: absolute;
	height: 100%;

	display: flex;
	align-items: center;

	font-size: min(100px, 10em);
	color: var(--side-text);

	transition: font-size .5s;
	z-index: 1;
}

#tuner-canvas {
	position: absolute;
	height: 100%;
	width: 100%;
}

#tuner-volume {
	grid-area: volume;

	display: grid;
	grid-template-columns: repeat(5, 1fr);
	align-items: center;

	padding: 0.5em;

	background-color: var(--form-panel);
}

#tuner-volume input {
	grid-column: span 4;
}

#tuner-volume span {
	display: flex;
	justify-content: center;
}

@keyframes run {
	from { font-size: min(100px, 10em); }
	to { font-size: min(90px, 9em); }
}

#tuner-display-wrapper.running {
	opacity: 1;
}

#tuner-display.running {
	color: mediumvioletred;

	transition: font-size .5s;
	animation: run .7s infinite alternate ease-in-out;
}

#tuner-display.listening {
	color: mediumblue;
}

#tuner-controls {
	grid-area: controls;

	display: grid;
	gap: 0.5em;
	padding: 0.5em;
}

#tuner-controls .button {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;

	font-size: 1em;

	background-color: var(--button-color);
	border: 1px solid var(--button-outline);
}

#tuner-tempering {
	grid-area: tempering;

	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(5, 1fr);
	gap: 0.5em;
	padding: 0.5em;
}

#tuner-tempering h3 {
	font-size: 1.5em;
	display: flex;
	justify-content: center;
	align-items: center;
}

#tuner-tempering h3, #tuner-equal + label {
	grid-column: span 2;
}

/* Media picker panel */
#media-picker-panel {
	grid-area: picker;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;

	background-color: var(--other-panel);
}

#search-bar {
	min-height: max(30px, 7svh);
	width: 100%;

	font-size: 1.3em;
	text-align: right;

	padding: 0 0.5em;
	border-bottom: 1px solid var(--panel-outline);

	background-color: var(--info-panel);
}

#sort-buttons {
	height: max(30px, 7svh);
	width: 100%;

	display: grid;
	grid-template-columns: repeat(4, 1fr);
	align-items: center;

	border-bottom: 1px double var(--panel-outline);
}

#sort-buttons h2 {
	font-size: 1.2em;
	padding: 0 0 0 0.5em;
	overflow-x: hidden;
}

#sort-options {
	grid-column: span 3;
	height: 100%;
	flex: 1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

#track-list {
	width: 100%;
	padding: 0.5em 1em;

	overflow-y: scroll;
	scroll-snap-type: y proximity;

	display: grid;

	gap: 0.5em;
}

.separator {
	grid-column: 1 / -1;

	min-height: max(20px, 5svh);
	font-size: 1.5em;

	display: flex;
	justify-content: space-between;
	align-items: center;

	scroll-snap-align: start;

	color: var(--text-color);
	background-color: inherit;
	border: none;
}

.separator:hover {
	border: none;
}

#track-list.loading {
	display: flex;
	height: 77%;
	flex-direction: column;
	justify-content: flex-start;
}

#track-list.loading > div {
	width: 100%;
	height: 20%;
	font-size: 120%;
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	align-items: center;
}

@keyframes load {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.loading-icon {
	aspect-ratio: 1/1;
	height: 50%;
	transform-origin: center;
}

.loading-icon.loading {
	animation: load 1s infinite linear;
}

#track-list .track-zone {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.5em;

	border-top: 1px solid var(--panel-outline);
}

input[type="checkbox"]:checked + .track-zone .track {
	display: none;
}

input[type="checkbox"]:checked + .track-zone {
	height: auto;
}

.separator::after {
	content: "-";
}

input[type="checkbox"]:checked + .track-zone .separator::after {
	content: "+";
}

.track {
	aspect-ratio: 2/3;

	display: grid;
	grid-template-areas:
		".      type   .    "
		"title  title  title"
		"title  title  title"
		"title  title  title"
		"title  title  title"
		"title  title  title"
		"button button button "
		"infos  infos  infos";

	align-items: center;

	border: 1px ridge var(--side-outline);
	border-radius: 5px;
	background-image: url(./binding-light.png);

	padding: 0 0.5em;

	transition: border .25s, background-color .25s;
}

.track.repertoire {
	grid-auto-rows: minmax(40px, auto);
	aspect-ratio: auto;
	background-image: url(./binding-light.png);
}

.track.opened.repertoire {
	grid-auto-rows: auto;
}

/* Card-options display */
@media (orientation: portrait) {
	.track.opened {
		grid-template-areas:
			"type    type    button"
			"title   title   button"
			"title   title   button"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"infos   infos   infos";
	}

	#track-read-options.midi {
		grid-template-areas:
			"tonality  tonality  tonality"
			"tonality  tonality  tonality"
			"tonality  tonality  tonality"
			"tonality  tonality  tonality"
			"tempo     tempo     tempo"
			"tempo     tempo     tempo"
			"transpose transpose loop"
			"transpose transpose loop"
			"transpose transpose loop";
	}

	#start-tonaliting {
		grid-template-columns: repeat(4, 1fr);
		grid-template-rows: repeat(4, 1fr);
	}

	#start-tonaliting h3 {
		grid-column: span 4;
	}

	#start-transposing {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: repeat(3, 1fr);
	}

	#start-transposing h3 {
		grid-column: span 2;
	}

	.track.opened.repertoire {
		grid-template-areas:
			"title   title   button"
			"title   title   button"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"infos   infos   infos";
	}

	#track-read-options.repertoire {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: repeat(4, 1fr);
	}

	#track-read-options.repertoire > div,
	#track-read-options.repertoire > a {
		grid-row: span 2;
	}
}

@media (orientation: landscape) {
	.track.opened {
		grid-template-areas:
			"type    type    type    button  button"
			"title   title   title   button  button"
			"title   title   title   button  button"
			"options options options options options"
			"options options options options options"
			"options options options options options"
			"options options options options options"
			"options options options options options"
			"options options options options options"
			"options options options options options"
			"infos   infos   infos   infos   infos";
	}

	#track-read-options.midi {
		grid-template-areas:
			"tonality  tonality  tonality  loop      loop"
			"tonality  tonality  tonality  loop      loop"
			"tonality  tonality  tonality  loop      loop"
			"tonality  tonality  tonality  tempo     tempo"
			"tonality  tonality  tonality  tempo     tempo"
			"transpose transpose transpose transpose transpose";
	}

	#start-tonaliting {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: repeat(5, 1fr);
	}

	#start-tonaliting h3 {
		grid-column: span 3;
	}

	#start-transposing {
		grid-template-columns: repeat(4, 1fr);
		grid-template-rows: repeat(2, 1fr);
	}

	#start-transposing h3 {
		grid-column: span 4;
	}

	.track.opened.repertoire {
		grid-template-areas:
			"title   title   button"
			"title   title   button"
			"options options options"
			"options options options"
			"options options options"
			"options options options"
			"infos   infos   infos";
	}

	#track-read-options.repertoire {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: repeat(4, 1fr);
	}

	#track-read-options.repertoire > div,
	#track-read-options.repertoire > a {
		grid-row: span 2;
	}
}

.track.opened {
	grid-column: 1 / -1;
	aspect-ratio: auto;

	display: grid;
	align-items: center;
	gap: 0.5em;

	scroll-snap-align: start;
}

.track-type {
	grid-area: type;

	width: 100%;
	text-align: center;

	font-size: 1em;
	color: var(--info-text);
	text-shadow: 1px 1px 3px #333333;
}

.track-title {
	grid-area: title;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;

	text-align: center;

	text-shadow: 1px 1px 3px #333333;
}

.track-infos {
	grid-area: infos;
	width: 100%;

	display: flex;
	justify-content: space-between;
	text-shadow: 1px 1px 3px #333333;
}

#track-read-options.midi, #track-read-options.repertoire {
	grid-area: options;
}

#track-wrapper-button {
	grid-area: button;
	width: 100%;
	height: 100%;
	background-color: var(--click-button-transparent);
	border-radius: 5px;
}

.track-title h4 {
	font-size: 1.2em;
}

.track-title h5 {
	font-size: 0.8em;
	font-style: italic;
}

.track-title h5.composer {
	font-size: 0.9em;
	font-style: italic;
	order: -1;
}

.track-infos h6 {
	font-size: 0.9em;
	color: var(--info-text);
}

.track-type.opened {
	display: none;
}

/* Read-options on cards (exercises) */
#track-read-options.midi {
	height: 0;
	opacity: 0;
	transform: scaleY(0);
	transform-origin: left top;

	display: grid;
	gap: 0.5em;
	align-items: center;

	transition: all .25s ease-out;
}

#start-tonaliting {
	grid-area: tonality;

	display: grid;
	gap: 0.5em;
}

#start-tonaliting h3 {
	text-align: center;
}

#track-tempo {
	grid-area: tempo;

	display: grid;
	grid-template-rows: repeat(2, 1fr);
	grid-template-columns: repeat(4, 1fr);
	gap: 0.5em;
	align-items: center;
}

#track-tempo h3 {
	grid-column: span 4;
	text-align: center;
}

#track-tempo input {
	grid-column: span 3;
}

#track-tempo span {
	text-align: center;
}

#start-transposing {
	grid-area: transpose;

	display: grid;
	gap: 0.5em;
}

#start-transposing h3 {
	text-align: center;
}

#start-looping {
	grid-area: loop;

	display: grid;
	/* grid-template-columns: repeat(1, 1fr); */
	grid-template-rows: repeat(3, 1fr);
	gap: 0.5em;
}

#start-looping h3 {
	text-align: center;
}

/* Read-options on cards (repertoire) */
#track-read-options.repertoire {
	display: grid;
	grid-auto-flow: column;
	gap: 0.5em;

	background-color: var(--form-panel);
}

/* Settings advanced
	- title
	- playing parameters
	- metronome bpm
	- tuning parameters */
#tonaliting {
	grid-area: tonality;
}

#looping {
	grid-area: loop;
}

#metronoming {
	grid-area: metronome;
}

#metro-settings {
	grid-area: settings;
}

#tempo-advanced {
	grid-area: tempo;
}

#transposing {
	grid-area: transpose;
}

#starting {
	grid-area: start;
}


@media (orientation: portrait) {
	#settings-advanced-panel {
		grid-template-areas:
			"tonality  tonality"
			"tonality  tonality"
			"tonality  tonality"
			"tonality  tonality"
			"loop      metronome"
			"loop      metronome"
			"loop      metronome"
			"settings  settings"
			"tempo     tempo"
			"tempo     tempo"
			"transpose start"
			"transpose start"
			"transpose start"
			"transpose start";

		grid-auto-rows: minmax(50px, 1fr);
		grid-auto-columns: 1fr;
	}
}

@media (orientation: landscape) {
	#settings-advanced-panel {
		grid-template-areas:
			"tonality  tonality  tonality  start     start"
			"tonality  tonality  tonality  start     start"
			"tonality  tonality  tonality  start     start"
			"tonality  tonality  tonality  start     start"
			"tempo     tempo     tempo     tempo     tempo"
			"tempo     tempo     tempo     tempo     tempo"
			"transpose transpose loop      metronome metronome"
			"transpose transpose loop      metronome metronome"
			"transpose transpose loop      metronome metronome"
			"transpose transpose loop      metronome metronome"
			"settings  settings  settings  settings  settings";

		grid-auto-rows: minmax(50px, 1fr);
		grid-auto-columns: 1fr;
	}
}

#settings-advanced-panel {
	grid-area: settings;
	display: grid;
}

#settings-advanced-panel.repertoire {
	display: none;
}

#settings-advanced-panel h3 {
	display: flex;
	justify-content: center;
	align-items: center;
}

#tonaliting {
	padding: 0.5em;

	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(4, 1fr);
	gap: 0.5em;
}


#tonaliting h3 {
	grid-column: span 4;
}

#tempo-advanced {
	padding: 0.5em;
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	grid-template-rows: repeat(2, 1fr);
}

#tempo-advanced h3 {
	grid-column: span 8;
}

#tempo-input-advanced {
	grid-column: span 7;
	display: flex;
	justify-content: center;
}

#tempo-display-advanced {
	display: flex;
	justify-content: center;
}

#metro-settings {
	display: grid;
	padding: 0 0.5em;

	background-color: var(--form-panel);
}

#metro-settings .click-button {
	opacity: .5;
	background-color: gray;
	border: none;
}

#metro-settings .click-button:hover {
	border: none;
}

#looping, #transposing, #metronoming, #starting {
	padding: 0.5em;
	display: grid;
	gap: 0.5em;
}

#transposing, #starting {
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(4, 1fr);
}

#metronoming, #looping {
	grid-template-columns: repeat(1, 1fr);
	grid-template-rows: repeat(3, 1fr);
}

#looping h3, #transposing h3, #metronoming h3, #starting h3,
#looping label, #metronoming label, #looping h4, #metronoming h4,
#transposing label:first-of-type, #starting label:first-of-type,
#transposing label:last-of-type, #starting label:last-of-type {
	grid-column: span 2;
}