* {
  transition: all .1s ease;
  z-index:1;
}

body {
    background-color: white;
    padding-top: 0px;
    margin-top: 0px;
    font-family: "Times New Roman", Times, serif;
    overflow: hidden;
    height: 100vh;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("SourceSans3-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("SourceSans3-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "BandMate Serif";
  src: url("NotoSerif-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

#staff {
  position: absolute;
  top: 52%; /* Adjust the vertical position as needed */
  transform: translateY(-50%);
}
.container {
    display: flex;
    align-items: center; /* Centers items vertically */
    justify-content: center; /* Centers items horizontally */
    height: 100vh; /* Adjust this value as needed */
   margin-top: 0px;
  }

#polygon {
   position:fixed;
    width: 100vw;
    height: 45px;
   /* shape-outside: polygon(
        10% 0, 90% 0, 87% 100%, 13% 100%, 10% 0
    );*/
    clip-path: polygon(
        10% 0, 90% 0, 87% 100%, 13% 100%, 10% 0
    );
    background: rgb(51, 49, 50);
    z-index: 1;
  }

  #polygon2 {
    position: fixed;
    top: 0;
    right: 0;
    width: 90px; /* Adjust the width as needed */
    height: 100vh;
    shape-outside: polygon(
      
    );
    clip-path: polygon(
        100% 10%, 100% 90%, 0% 80%, 0% 20%, 100% 10%
    );
    background: rgb(51, 49, 50);
  }

  #cents {
    position: fixed;
    top: calc(50vh - 10px);
    right: 100px;
    font-family: "BandMate Serif", "Times New Roman", Times, serif;
    font-size: 30pt;
    line-height: 20px;
  }

  @media screen and (max-width: 768px) {
    .container {
      flex-direction: column;
      height: auto;
    }
  }

  .hidden {
    display: none;
  }

  .dropdown {
    position: relative;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    position: relative;
  display: inline-block;
  margin: 0 auto;
  z-index: 1;
  }
  
  .dropbtn {
    padding-top: 3px;
  background-color: rgb(51, 49, 50);
    color: white;
    border: none;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    z-index: 1;
  }

  
  
  
  .dropdown-content {
    display: block;
  margin: 0 auto;
    position: absolute;
    min-width: 200px;
    z-index: 1;
    background-color: #f9f9f9;
    border: 1px solid rgb(51, 49, 50);
    left: 50%;
  transform: translateX(-50%);
  display: none;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 20px;
  top:50px;
  }
  
  .grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 13px;
    padding: 7px;
    padding-bottom: 20px;
  }
  
  .grid-item {
    display: flex;
    text-align: center;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 10px;
    width: 100px;
  align-items: center;
  justify-content: center;
  
  }

  .dropdown-content .grid-item:not(.empty):hover {
    background-color: rgb(153, 191, 84);
  }
  
  /* Style the dropdown items */
  .dropdown-content .grid-item {
    grid-column: span 1;
  }
  
  .dropdown-content .grid-item:hover {
    background-color: #f9f9f9;
  }
  

  .grid-item.empty {
    background-color: transparent;
  }

  .dropbtn {
  font-family: "Source Sans 3", Roboto, Arial, sans-serif;
}

.triangle {
  position: relative;
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid white;
  margin-left: 5px;
  top: -5px;
}

.dropdown-content .grid-item {
  font-family: "Source Sans 3", Roboto, Arial, sans-serif;
  font-weight: 400;
}

.top-controls {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 4vw, 40px);
  z-index: 10002;
}

.top-controls .dropdown {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  display: inline-block;
  margin: 0;
  z-index: 10002;
}

.top-controls .dropbtn {
  height: 45px;
  padding: 0 8px;
  font-family: "Source Sans 3", Roboto, Arial, sans-serif;
  font-size: clamp(20px, 4vw, 30px);
  font-style: italic;
  font-weight: 400;
  line-height: 45px;
  white-space: nowrap;
}

.top-controls .triangle {
  top: -4px;
}

.top-controls .dropdown-content {
  top: 45px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 58px);
  max-height: calc(100dvh - 58px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  z-index: 10003;
}

.instrument-dropdown-content {
  width: min(620px, calc(100vw - 16px));
}

.instrument-grid {
  grid-template-columns: repeat(5, minmax(82px, 1fr));
}

.instrument-grid .grid-item {
  width: auto;
  min-height: 38px;
  box-sizing: border-box;
  font-size: clamp(13px, 2vw, 16px);
}

.emoji-dropdown-content {
  min-width: min(400px, calc(100vw - 16px));
}

.emoji-grid {
  width: min(400px, calc(100vw - 16px));
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  grid-gap: 8px;
  box-sizing: border-box;
  padding: 8px;
}

.emoji-grid .emoji-grid-item {
  width: auto;
  min-height: 82px;
  box-sizing: border-box;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
}

.emoji-grid .emoji-none {
  grid-column: 1 / -1;
  min-height: 42px;
}

.emoji-menu-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

@media screen and (max-width: 650px) {
  .top-controls {
    gap: 8px;
  }

  .top-controls .dropbtn {
    padding: 0 5px;
    font-size: 20px;
  }

  .instrument-grid {
    grid-template-columns: repeat(3, minmax(82px, 1fr));
  }

  .emoji-grid {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    grid-gap: 6px;
  }

  .emoji-grid .emoji-grid-item {
    min-height: 70px;
    font-size: 12px;
  }

  .emoji-grid .emoji-none {
    min-height: 38px;
  }

  .emoji-menu-icon {
    width: 34px;
    height: 34px;
  }
}

/*toggle switch*/
input[type=checkbox]{
	position: absolute;
	height: 1px;
	width: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

label {
	cursor: pointer;
	
	width: 120px;
	height: 60px;
	background: #b2afaa;
	display: block;
	border-radius: 100px;
	position: relative;
}

label:after {
	content: '';
	position: absolute;
	top: 2px;
	left: 5px;
	width: 57px;
	height: 57px;
	background: white;
	border-radius: 90px;
	transition: 0.1s;
}

input:checked + label {
	background: #b2afaa;
}

input:checked + label:after {
	left: calc(100% - 5px);
	transform: translateX(-100%);
}

label:active:after {
	width: 57px;
}

/* centering */
#switch {
	position: absolute;
	display: block;
	height: 1px;
	width: 1px;
	margin: 0;
	opacity: 0;
}

#bottomCenter {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 50%;
  bottom: max(5px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  gap: clamp(3px, 1.2vw, 10px);
  max-width: calc(100vw - 12px);
  z-index: 10000;
}

@media (max-height: 700px) {
  /* Your CSS rules for changing the position of the div go here */
  #bottomCenter {
    /* For example, you can change the top margin to reposition the div */
    display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  z-index: 10000;
  }

  #start {
    position: absolute;
    font-size: 60px;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
  }
}



#bottom {
  position: absolute;
  left: 20px;
  bottom: 5px;
}

.toggle-text-left {
  margin-right: 0;
  font-family: "BandMate Serif", "Times New Roman", Times, serif;
  font-size: clamp(46px, 9vw, 75px);
  color: Black;
  vertical-align: middle;
    line-height: .8;
  
}

.toggle-text-right {
  margin-left: 0;
  font-family: "BandMate Serif", "Times New Roman", Times, serif;
  font-size: clamp(46px, 9vw, 75px);
  color: #b2afaa;
  vertical-align: middle;
  vertical-align: middle;
    line-height: .8;
}

#noteLetter {
  position: absolute;
  top: 44%; /* Adjust the vertical position as needed */
  left: -340px; /* Adjust the distance from the left side as needed */
  transform: translate(-50%, -50%); /* Center the element */
  font-family: "BandMate Serif", "Times New Roman", Times, serif;
  font-size: 200px; /* Adjust the font size as needed */
}

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.start-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  z-index: 2;
}

.hidden {
  display: none;
}

#start {
  position: absolute;
  font-family: "Source Sans 3", Roboto, Arial, sans-serif;
  font-size: 60px;
  font-style: normal;
  font-weight: 400;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
}



/* CSS */
.button-3 {
  appearance: none;
  background-color:  #F9F9F9;
  border: 1px solid rgba(27, 31, 35, .15);
  border-radius: 200px;
  box-shadow: rgba(27, 31, 35, .1) 0 1px 0;
  box-sizing: border-box;
  color:blackS;
  cursor: pointer;
  display: inline-block;
  font-family: "Source Sans 3", Roboto, Arial, sans-serif;

  font-weight: 400;
  line-height: 20px;
  padding: 20px 16px 30px 16px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
}

.button-3:focus:not(:focus-visible):not(.focus-visible) {
  box-shadow: none;
  outline: none;
}

.button-3:hover {
  border: 3px solid rgba(27, 31, 35, .15);
  background-color: #b2afaa;
}

.button-3:focus {
  outline: none;
}

.button-3:disabled {
  background-color: #94d3a2;
  border-color: rgba(27, 31, 35, .1);
  color: rgba(255, 255, 255, .8);
  cursor: default;
}

.button-3:active {
  box-shadow: rgba(20, 70, 32, .2) 0 1px 0 inset;
  background-color:  #F9F9F9;
}

#centered{
  z-index:1;
}

#switch{
  z-index:500;
}

#canvas-container {
  position: fixed;
  top: 20vh;
  right: 0;
  width: 90px;
  height: 60vh;
  z-index: 9999;
}

#noteLetter sup {
  vertical-align: super;
  font-size: smaller;
}

#myDiv {
  position: relative;
}

#emojiReward {
  position: fixed;
  top: 52vh;
  left: calc(75vw + 39px);
  width: clamp(38px, 7vw, 140px);
  height: clamp(38px, 7vw, 140px);
  display: block;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--emoji-scale, 0.6));
  transform-origin: center center;
  transition: opacity 0.12s ease, transform 0.18s ease;
  z-index: 9998;
}

@media screen and (max-width: 735px) {
  #emojiReward {
    left: calc(100vw - 145px);
  }
}

#emojiReward.visible {
  opacity: 1;
  visibility: visible;
}

#emojiReward.success {
  animation: emojiRewardShake 0.42s ease-in-out infinite;
}

@keyframes emojiRewardShake {
  0%, 100% {
    transform: translate(-50%, -50%) scale(var(--emoji-scale, 1.1)) rotate(0deg);
  }
  20% {
    transform: translate(-50%, -50%) scale(var(--emoji-scale, 1.1)) rotate(-8deg);
  }
  40% {
    transform: translate(-50%, -50%) scale(var(--emoji-scale, 1.1)) rotate(8deg);
  }
  60% {
    transform: translate(-50%, -50%) scale(var(--emoji-scale, 1.1)) rotate(-6deg);
  }
  80% {
    transform: translate(-50%, -50%) scale(var(--emoji-scale, 1.1)) rotate(6deg);
  }
}

.superscript {
  position: absolute;
  top: -0.1em; /* Adjust the value as needed */
  font-size: 0.5em; /* Adjust the font size as needed */
}

.superscript.a-flat-accidental {
  transform: translateX(-0.12em);
}

#Justin {
  position: absolute;
  top: 50vh;
  left: 10px;
}

#Help {
  position: static;
  flex: 0 0 auto;
  margin-left: clamp(14px, 2.4vw, 24px);
  font-size: clamp(13px, 2.5vw, 15px);
  background-color:  #F9F9F9;
  border: 1px solid rgba(27, 31, 35, .15);
  border-radius: 25px;
  box-shadow: rgba(27, 31, 35, .1) 0 1px 0;
  box-sizing: border-box;
  color:blackS;
  cursor: pointer;
  display: inline-block;
  font-family: "Source Sans 3", Roboto, Arial, sans-serif;

  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  padding: 8px 10px;
  white-space: nowrap;
}

#Help a {
  color: black; /* Default link color */
  text-decoration: none; /* Remove underline */
}

#Help a:active {
  color: blue; /* Link color when clicked */
}

@media screen and (max-width: 900px) {
  :root {
    --mobile-tuner-width: clamp(62px, 11vw, 82px);
    --mobile-top-height: 45px;
    --mobile-bottom-reserve: 74px;
  }

  #polygon2,
  #canvas-container {
    width: var(--mobile-tuner-width);
  }

  #canvas-container {
    top: 16dvh;
    height: 68dvh;
  }

  #cents {
    right: calc(var(--mobile-tuner-width) + 8px);
    top: calc(50dvh - 10px);
    font-size: clamp(24px, 5vw, 34px);
  }

  #emojiReward {
    top: 52dvh;
    left: calc(100vw - var(--mobile-tuner-width) - clamp(88px, 14vw, 112px));
    width: clamp(34px, 5.8vw, 46px);
    height: clamp(34px, 5.8vw, 46px);
  }

  .container {
    position: fixed;
    top: calc(var(--mobile-top-height) + ((100dvh - var(--mobile-top-height) - var(--mobile-bottom-reserve)) / 2));
    left: calc((100vw - var(--mobile-tuner-width)) / 2);
    width: calc(100vw - var(--mobile-tuner-width) - 8px);
    height: calc(100dvh - var(--mobile-top-height) - var(--mobile-bottom-reserve));
    transform: translate(-50%, -50%);
  }

  #staff {
    top: 50%;
    left: 63%;
    transform: translate(-50%, -50%);
  }

  #staff img {
    display: block;
    width: clamp(150px, 48vw, 235px);
    height: auto;
  }

  #noteLetter {
    top: 50%;
    left: -105px;
    font-size: clamp(90px, 28vw, 170px);
  }

  #bottomCenter {
    --switch-width: clamp(86px, 22vw, 120px);
    --switch-height: clamp(42px, 11vw, 60px);
    bottom: max(4px, env(safe-area-inset-bottom));
    gap: clamp(2px, 1vw, 7px);
  }

  #bottomCenter label {
    width: var(--switch-width);
    height: var(--switch-height);
  }

  #bottomCenter label:after {
    top: 2px;
    left: 4px;
    width: calc(var(--switch-height) - 4px);
    height: calc(var(--switch-height) - 4px);
  }

  #bottomCenter input:checked + label:after {
    left: calc(100% - 4px);
    transform: translateX(-100%);
  }

  .toggle-text-left,
  .toggle-text-right {
    font-size: clamp(42px, 10vw, 68px);
  }

  #Help {
    font-size: clamp(12px, 2.4vw, 14px);
    padding: 6px 8px;
  }
}

@media screen and (max-width: 520px) and (orientation: portrait) {
  :root {
    --mobile-tuner-width: 58px;
    --mobile-bottom-reserve: 82px;
  }

  .top-controls {
    gap: 10px;
  }

  .top-controls .dropbtn {
    font-size: 20px;
  }

  .container {
    width: calc(100vw - var(--mobile-tuner-width) - 10px);
  }

  #staff {
    left: 61%;
  }

  #staff img {
    width: min(42vw, 165px);
  }

  #noteLetter {
    left: -120px;
    font-size: clamp(76px, 24vw, 130px);
  }

  #emojiReward {
    top: 58dvh;
    left: calc(100vw - var(--mobile-tuner-width) - 30px);
    width: 32px;
    height: 32px;
  }

  #bottomCenter {
    --switch-width: 86px;
    --switch-height: 43px;
    transform: translateX(-50%) scale(0.88);
    transform-origin: bottom center;
  }

  .toggle-text-left,
  .toggle-text-right {
    font-size: 46px;
  }
}

@media screen and (max-height: 520px) and (orientation: landscape) {
  :root {
    --mobile-tuner-width: clamp(62px, 10vw, 76px);
    --mobile-top-height: 40px;
    --mobile-bottom-reserve: 58px;
  }

  #polygon {
    height: var(--mobile-top-height);
  }

  .top-controls {
    height: var(--mobile-top-height);
    gap: clamp(18px, 5vw, 44px);
  }

  .top-controls .dropbtn {
    height: var(--mobile-top-height);
    padding: 0 6px;
    font-size: clamp(20px, 4.2vw, 28px);
    line-height: var(--mobile-top-height);
  }

  .top-controls .dropdown-content {
    top: var(--mobile-top-height);
  }

  #staff {
    top: 52%;
    left: 61%;
  }

  #staff img {
    width: min(clamp(150px, 30vw, 230px), calc(100dvh * 0.62));
  }

  #noteLetter {
    top: 52%;
    left: -170px;
    font-size: min(clamp(95px, 24vw, 160px), calc(100dvh * 0.58));
  }

  #emojiReward {
    top: 52dvh;
    left: calc(100vw - var(--mobile-tuner-width) - clamp(96px, 15vw, 118px));
    width: clamp(34px, 5.8vw, 46px);
    height: clamp(34px, 5.8vw, 46px);
  }

  #bottomCenter {
    --switch-width: clamp(78px, 13vw, 98px);
    --switch-height: clamp(38px, 7vw, 48px);
    transform: translateX(-50%) scale(0.92);
    transform-origin: bottom center;
  }

  .toggle-text-left,
  .toggle-text-right {
    font-size: clamp(42px, 8vw, 58px);
  }
}





  

 

