body {
    font-family: Merriweather, serif;
    color: #222;
    margin: 10px auto;
    width: 90%;
    max-width: 800px;
    background-color: #f9fbff;
    line-height: 1.5em
}

.footnote {
    display: none
}

#footnotes > * {
    display: block;
    margin: 0 0 16px
}

span.fnindex {
    font-weight: 700;
    margin-right: 1em
}

a.fnbacklink {
    margin-left: 1em
}

a.fnbacklink,
a.fnlink {
    color: #6f55cc;
    text-decoration: none
}

div#footnotes {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid #ccc;
    margin: 1em -10px 0;
    padding: 1em 10px
}

sup {
    vertical-align: top;
    font-size: 0.75em;
    position: relative;
    top: -3px;
}

sub {
    vertical-align: bottom;
    font-size: 0.75em;
    position: relative;
    top: 5px;
}

p.section-start {
	border-top: 1px solid #ccc;
	margin-top: 1em;
	padding-top: 1em;
}

chord, interval, sequence, tone {
    color: #6f55cc;
    cursor: pointer
}

chord .katex-display,
interval .katex-display,
sequence .katex-display,
tone .katex-display {
    color: #222;
}

sequence .katex-display .katex-html .base:after, chord .katex-display .katex-html .base:after {
    content: "";
    position: absolute;
    left: -10px;
    top: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px dotted #b2a5e4;
    border-radius: 5px;
}

table ~ a.fnlink {
    float: right;
    position: relative;
}

table.outer-borders {
	border: 1px solid #ccc
}

table.column-borders td {
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
}
table.row-borders td {
	border-top: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
}
table.header-borders tr:first-child {
	border-bottom: 1px solid #ccc;
}
span.sideways {
	position: absolute;
	transform: translate(-50%, -50%) rotate(-90deg);
}

table.first-column-border tr td:first-child {
	border-right: 1px solid #ccc;
}

table.column-divider tr td:nth-child(2) {
	border-right: 4px solid #ccc;
}

table.second-row-divider tr:nth-child(2) {
	border-bottom: 1px solid #ccc;
}

table.fifth-row-border tr:nth-child(5) {
	border-bottom: 1px solid #ccc;
}

table.valign tr td {
	vertical-align: top;
}


table {
	border-collapse: collapse;
	margin: 0 auto;
	width: 90%;
}

td {
  padding: 5px;	
}

table#partial-tones {
    text-align: center;
    border: 1px solid #ccc;
}

table#partial-tones tr:nth-child(2) {
	border-bottom: 1px solid #ccc;
}

figure {
    margin: 0 auto;
    text-align: center;
    overflow: auto;
}

figcaption {
    margin: 10px;
	text-align: left;
}

.katex-display {
    overflow-x: auto;
    padding: 10px 0;
}

div.score,
img.score,
div.figure {
    width: 100%;
    overflow-x: auto;
}

.score > object,
.figure > img {
    width: 800px;
}

img[src$=svg] {
  cursor: pointer;
}

img[src$=svg].playing,
.hh-playing img[src$=svg] {
    background: rgba(0,0,255,0.1);
    border-radius: 5px;
}

.page-marker, .version, .feedback {
    position: fixed;
    display: block;
    right: 0;
    bottom: 0;
    height: 1.5em;
    opacity: 0;
    box-shadow: -5px 0px 10px 0 rgba(0,0,0,0.2);
    padding: 8px;
    background-color: mintcream;
}

.version {
    opacity: 1;
    left: 0;
    width: max-content;
    box-shadow: 5px 0px 10px 0px rgb(0 0 0 / 20%);
}

.feedback {
    opacity: 1;
    top: 0;
}

/* override link styling */
.feedback a {
    color: #222;
    text-decoration: none;
}

.umop-apisdn {
    display: inline-block;
    transform: rotate(180deg);
    position: relative;
    bottom: 0.25em;
} 


.modal {
  display: none; 
  position: fixed;
  z-index: 1; 
  padding-top: 100px; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: #f9fbff;
  background-color: rgba(0,0,0,0.4); 
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  -webkit-animation-name: animatetop;
  -webkit-animation-duration: 0.4s;
  animation-name: animatetop;
  animation-duration: 0.4s
}

@-webkit-keyframes animatetop {
  from {top:-300px; opacity:0} 
  to {top:0; opacity:1}
}

@keyframes animatetop {
  from {top:-300px; opacity:0}
  to {top:0; opacity:1}
}

.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.button {
  background-color: #f9fbff;
  border: none;
  padding: 5px 5px;
  text-align: center;
  cursor: pointer;
}

.numbers {
  background-color: #f9fbff; 
  border: 1px solid #ccc;
  color: black;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 100%;
  cursor: pointer;
}

.numbers:hover {
  background-color: #ccc;
  color: black;
}

.keyboard-wrap {
	overflow: auto;
}

.keyboard-wrap > div {
    width: 760px;
    margin: 0 auto;
}

button.scopeGo {
  background-color: #f9fbff;
  border: solid 1px #ccc;
  padding: 1px 5px;
  text-align: center;
  cursor: pointer;
  font-size: 20px;
   -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;
}

button.scopeGo:hover {
  background-color: #ccc;
  color: black;
}
.options {
  background-color: #f9fbff;
  border: solid 1px #ccc;
  padding: 5px 5px;
  text-align: center;
  cursor: pointer;
  -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;
}

.options:hover {
  background-color: #ccc;
  color: black;
}

button.lissajousGo {
  background-color: #f9fbff;
  border: solid 1px #ccc;
  padding: 1px 5px;
  text-align: center;
  cursor: pointer;
  font-size: 20px;
   -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;
}

button.lissajousGo:hover {
  background-color: #ccc;
  color: black;
}


button.oscillatorGo {
  background-color: #f9fbff;
  border: solid 1px #ccc;
  padding: 1px 5px;
  text-align: center;
  cursor: pointer;
  font-size: 20px;
   -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;
}

button.oscillatorGo:hover {
  background-color: #ccc;
  color: black;
}

button.numericHarmonicAnalyzerGo {
  background-color: #f9fbff;
  border: solid 1px #ccc;
  padding: 1px 5px;
  text-align: center;
  cursor: pointer;
  font-size: 20px;
   -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;
}

button.numericHarmonicAnalyzerGo:hover {
  background-color: #ccc;
  color: black;
}

/* radio button setup */
.radio-toolbar {
  margin: 10px;
}

.radio-toolbar input[type="radio"] {
    display:none; 
}

.radio-toolbar label {
    display:inline-block;
    background-color:#f9fbff;
    padding: 5px 10px;
    font-size:16px;
    border: 1px solid #ccc;
    border-radius: 4px;   
	cursor: pointer;
}

.radio-toolbar label:hover {
  background-color: #eee;
}

.radio-toolbar input[type="radio"]:checked + label { 
    background-color:#ccc;
    border-color: #ccc;
}

/* .helpbutton:after {
     content: "?";
     border: 2px solid gray;
     padding: 10px;
     border-radius: 100px;
     font-size: 22px;
     color: gray;
     padding: 4px 10px;
     font-weight: bold;
}

.helpbutton:after {
    content: "";
    background: url(../figures/help.svg) no-repeat center center;
    width: 30px;
    height: 30px;
    display: block;
} */

.helpbutton {
	width: 30px;
	height: 30px;
	display: inline-block;
	background: url(../figures/help.svg) no-repeat center center;
}

.chapter-title {
  text-transform: uppercase;
}

.keyboard .keyboard-text {
  visibility: hidden;
  text-align: center;
  color: black;
  background-color: #fefefe;
  margin: 0;
  padding: 20px;
  border: 1px solid #888;
  width: 70%;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-right: -50%;
  transform: translate(-50%, -50%);
}

.keyboard:hover .keyboard-text {
  visibility: visible;
}

.btn-select.selected {
  outline: 1px solid rgba(0,0,255,0.3);
}

#controlpanel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
}
#controlpanel-button {
  position: absolute;
  right: 16px;
  bottom: 32px;
  width: 70px;
  height: 70px;
  text-align: center;
  box-shadow: 0 0 12px 1px rgba(0,0,0,0.2);
  background-color: #f3f3f3;
  background-image: -webkit-linear-gradient(top,#fefefe,#f3f3f3);
  background-image: -moz-linear-gradient(top,#fefefe,#f3f3f3);
  border: 1px solid #ccc;
  border-radius: 100px;
  z-index: 1;
  opacity: 0.3;
  transition: opacity 500ms,right 500ms;
  cursor: pointer;
}

#controlpanel.open #controlpanel-button,
#controlpanel-button:hover {
  opacity: 1;
}

#controlpanel-button > span {
  display: inline-block;
  user-select: none;
  pointer-events: none;
  font-size: 30px;
  line-height: 70px;
  transition: transform 500ms;
}

#controlpanel.open #controlpanel-button > span {
  transform: scaleX(-1);
}

#controlpanel-content {
  position: absolute;
  left: 100%;
  width: 100%;
  bottom: 0;
  height: 140px;
  opacity: 0;
  transition: left 500ms, opacity 200ms;
  border: 1px solid #999;
  background-color: #fff;
  background-image: -webkit-linear-gradient(top,#fff,#eee);
  background-image: -moz-linear-gradient(top,#fff,#eee);
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

#controlpanel.open #controlpanel-content {
  left: 0;
  opacity: 1;
}

#controlpanel .cp-scope {
  flex: 1 1 25%;
  overflow:hidden;
  max-width: 525px;
}

#controlpanel .cp-scope canvas {
  box-shadow: -3px 0 12px -1px rgba(0,0,0,0.2)
}

#controlpanel.initial-open * {
  transition: none;
}


nav {
  margin: 0 100px 0 0;
  font-size: 30px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

nav button, nav input {
    height: 40px;
    appearance: none;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 20px;
}

nav input {
    background-color: transparent;
    text-align: center;
    width: 6em;
}

nav button {
    width: 2em;
    cursor: pointer;
}
nav button[disabled] {
    cursor: default;
}

#cp-subtitle {
    color: #999;
    text-align: center;
    font-size: 14px;
    margin: 5px 0;
    font-weight: 400;
}

.title-page {
  text-align: center;
}