:root {
  font-size: 1.5vh;
  --fg-main: #841;
  --bg-dark: #000;
  --bg-main: #000;
}

@font-face {
  font-family: Rubik;
  src: url(/Rubik.ttf);
  font-weight: 400 500 600 700 800 900;
  font-display: swap;
}

@font-face {
  font-family: DancingScript;
  src: url(/create/DancingScript-Regular.ttf);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-main);
  color: #fff;
  font-family: Rubik, sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

body:not(.debug) .debug {
  display: none !important;
}

.wide {
  width: 100%;
  height: auto;
}

@media(orientation:portrait) {
  .wide {
    aspect-ratio: 1/1;
  }
}

@media(orientation:landscape) {
  .wide {
    width: 100vh;
    height: 100vh;
    margin: 0 calc(50% - 50vh);
  }
}

p {
  padding: 0 1rem;
}

h1 {
  user-select: none;
  font-family: Rubik;
  opacity: 0.5;
  margin: 0;
  font-weight: normal;
  font-size: 1rem;
  padding: 2rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}

h1 span {
  flex: 1;
}

h1 a {
  font-weight: bold;
  text-transform: none;
  text-decoration: none;
  color: inherit;
}

h1 a:hover {
  text-decoration: underline;
  color: #fff;
}

h1 a img {
  filter: grayscale(1.0);
}

h1 img,
p img,
span img {
  height: 1em;
}

p img,
span img {
  vertical-align: sub;
}

#motto {
  margin: 2em 0;
  font-size: 1rem;
  text-align: center;
  color: #888;
  font-family: DancingScript;
}

#motto img {
  height: 1.5em;
  vertical-align: middle;
}

#motto div:first-child {
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.wave_spanner {
  display: flex;
  width: 100%;
  height: 3rem;
  background: no-repeat center/100% 100% url('/img/waveform.png');
  opacity: 0.5;
  justify-content: space-between;
  align-items: end;
}

.wave_spanner.w3 {
  background-image: url('/img/waveform3.png');
}

.wave_spanner img {
  filter: invert(1);
  height: 1rem;
  margin: 0 1rem;
}

h2 {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

h4 {
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
}


.buttons {
  display: flex;
  justify-content: center;
}

button,
a.button,
.buttons>* {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  margin: 0 0.5rem;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

button,
a.button,
.buttons a {
  --background: #841;
  font-weight: bold;
  text-decoration: underline;
  color: #888;
  border-radius: 1em;
  padding: 1rem;
  transition: all 250ms;
}

button:hover,
a.button:hover,
.buttons a:hover {
  --background-color: #952;
  color: #fff;
}

button img,
a img {
  height: 1.5em;
  vertical-align: middle;
}

.buttons a.disabled,
button[disabled] {
  background-color: #444;
  cursor: inherit;
}

.buttons a.disabled:hover,
button[disabled]:hover {
  background-color: #444;
}

#footer {
  user-select: none;
  margin: 1rem 0;
  text-align: center;
  color: #ccc;
}

#footer a {
  color: inherit;
}

#error_info:empty {
  display: none;
}

#error_info {
  background: #400;
  color: #fff;
  margin: 0.5em 0;
  padding: 1em;
  text-align: left;
}

.grid {
  display: flex;
  flex-flow: row wrap;
  justify-content: left;
  padding: 1rem;
}

.grid>* {
  width: 25%;
  aspect-ratio: 1.0;
}

@media(orientation:landscape) {
  .grid>* {
    width: 12.5%;
  }
}

.grid img {
  width: 100%;
  height: auto;
}

svg.progress {
  transform: rotate(-90deg);
  background: #0008;
  border-radius: 50%;
}

svg.progress .cross {
  cursor: pointer;
}

svg.progress .cross line {
  transition: stroke 0.5s;
}

svg.progress .cross:hover line {
  stroke: #fff;
}

svg.progress circle {
  stroke-width: 3.5;
  fill: transparent;
  stroke: #ccc;
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 0.5s;
}

svg.progress line {
  stroke-width: 3.5;
  fill: transparent;
  stroke: #ccc;
  stroke-linecap: round;
}

/* .slider */

.slider {
  position: relative;
  width: 100%;
  height: 1em;
  cursor: pointer;
}

.slider svg.bar {
  position: absolute;
  width: 100%;
  height: 100%;
}

.slider svg.dot {
  position: absolute;
  height: 1em;
  width: 1em;
}

.slider line {
  stroke-width: 2;
  fill: transparent;
  stroke: #444;
  stroke-linecap: round;
}

.slider line.fg {
  stroke: var(--fg-main);
}

.slider .dot {
  transition: left 0.05s;
  box-shadow: #f00 0 0 1rem;
  border-radius: 50%;
}

.slider circle {
  fill: var(--fg-main);
  transition: filter 0.25s;
}

.slider circle:hover {
  filter: brightness(1.5);
}

/* https://en.wikipedia.org/wiki/Piano_key_frequencies */

.C {
  filter: hue-rotate(0deg);
}

.Cs {
  filter: hue-rotate(30deg);
}

.D {
  filter: hue-rotate(60deg);
}

.Ds {
  filter: hue-rotate(90deg);
}

.E {
  filter: hue-rotate(120deg);
}

.F {
  filter: hue-rotate(150deg);
}

.Fs {
  filter: hue-rotate(180deg);
}

.G {
  filter: hue-rotate(210deg);
}

.Gs {
  filter: hue-rotate(240deg);
}

.A {
  filter: hue-rotate(270deg);
}

.As {
  filter: hue-rotate(300deg);
}

.B {
  filter: hue-rotate(330deg);
}