:root {
  /* if it's used in 2d (ie a shadow-root) it must go in #outer */

  --color-transparent: rgb(0 0 0 / 0);

  --dark-none-or-block: block;
  --dark-block-or-none: none;

  --dialog-border-width: 3px;
  --rhythm-img-opacity: 1;

  --height-rhythm-word: 3.4rem;
  --height-mark: 1.2rem;

  --color-link-underline: var(--color-emphasis-fill-bright);
  --color-link-underline-active: var(--color-primary-fill);

  --color-logo-fg: var(--color-emphasis-text);
  --color-logo-bg: var(--color-emphasis-fill);

  --filter-color-emphasis-text: var(--filter-color-primary-text);
  --filter-color-secondary-fill: var(--filter-color-secondary-text);

  --has-dark: visible;
}

[data-theme="Dark"] {
  --dark-none-or-block: none;
  --dark-block-or-none: block;
}

@media screen and (min-width: 0) and (max-width: 500px) {
  :root {
    --width-rhythm-img: 4rem;
    --height-rhythm-img: 3.3rem;

    --width-rhythm-word: 4rem;
  }
}

@media screen and (min-width: 500px) and (max-width: 640px) {
  :root {
    --width-rhythm-img: 4.6rem;
    --height-rhythm-img: 3.7rem;

    --width-rhythm-word: 6rem;
  }
}

@media screen and (min-width: 640px) and (max-width: 1024px) {
  :root {
    --width-rhythm-img: 4.8rem;
    --height-rhythm-img: 3.9rem;

    --width-rhythm-word: 8rem;
  }
}

@media screen and (min-width: 1024px) {
  :root {
    --width-rhythm-img: 5rem;
    --height-rhythm-img: 4rem;

    --width-rhythm-word: 10rem;
  }
}

.filter-color-primary-text {
  filter: var(--filter-color-primary-text);
}

.filter-color-primary-rhythm {
  filter: var(--filter-color-primary-rhythm);
}

.filter-color-emphasis-rhythm {
  filter: var(--filter-color-emphasis-rhythm);
}

button.emphasis > span.clean > div > img.filter-color-primary-rhythm,
button.emphasis > span.clean > div > img.filter-color-primary-text,
.barAnswerStaff.emphasis > .barAnswer > div > img.filter-color-primary-rhythm,
.barAnswerStaff.emphasis > .barAnswer > div > img.filter-color-primary-text,
.filter-color-emphasis-text {
  filter: var(--filter-color-emphasis-text);
}

.filter-color-secondary-text {
  filter: var(--filter-color-secondary-text);
}

.filter-color-secondary-fill {
  filter: var(--filter-color-secondary-fill);
}

p {
  line-height: 1.5;
  margin: 1rem 0;
}

p.guide {
  font-size: 1.2rem;
}

div.guide {
  font-size: 1.2rem;
  font-weight: bold;
}

ol,
ul {
  list-style-type: none;
  list-style-position: inside;
  padding-left: 0;
  margin-left: 2rem;
}

a.underline {
  text-decoration: underline;
}

.guide {
  color: var(--color-secondary-text);
}

div.guide.emphasis {
  color: var(--color-secondary-text);
  font-weight: bold;
}

.buttonText {
  opacity: 0.7;
}

.selected > .buttonText {
  opacity: 1;
}

* {
  padding: 0;
  margin: 0;
  border-spacing: 0;
  color: var(--color-primary-text);
  /* color: black; */

  scrollbar-color: var(--color-primary-text) var(--color-primary-light);
}

*::-webkit-scrollbar {
  width: 18px;
  height: 18px;
}

*::-webkit-scrollbar-track {
  background: var(--color-primary-light);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--color-primary-text);
  border-radius: 9px;       /* roundness of the scroll thumb */
  border: 4px solid var(--color-primary-light);  /* creates padding around scroll thumb */
}

html {
  /* same as body, trying to fix chrome when cside pg change removes body */
  background-color: var(--color-primary-light);
  /* Try prevent delay on touch-enabled Linux laptops. */
  touch-action: manipulation;
  font-family: Verdana, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, Geneva, Arial, sans-serif;
  text-size-adjust: none;
}

a {
  text-decoration: none;
}

body {
  font-size: 1rem;
  background-color: var(--color-primary-light);
  /* prevent extra flash on buttons on chrome on mobile */
  -webkit-tap-highlight-color: transparent;
}

body.menuOpen {
  cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  border-width: 0.1rem; /* because looks weird on chrome: 1px for textarea but 2px for "text"  */
  padding: 0.5rem;
  font-family: Verdana, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, Geneva, Arial, sans-serif;
  font-size: 1rem;
  background-color: var(--color-primary-fill);
  color: var(--color-primary-text);
}

select {
  font-size: 1rem;
  padding-left: 0.5rem;
}

img:focus-visible,
a:focus-visible,
button:focus-visible,
div:focus-visible,
input:focus-visible,
select:focus-visible,
span:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary-text);
}

div.outer {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 0 0 0;
  padding: 0;
  display: grid;
  grid-gap: 0;
  /* 3 columns. */
  grid-template-columns: minmax(0, auto) minmax(min-content, 50rem) minmax(0, auto);
  /* 5 rows: heading content content expander footer */
  grid-template-rows: minmax(min-content, max-content) minmax(min-content, max-content) minmax(min-content, max-content) minmax(1rem, auto) minmax(min-content, max-content);
}

div.outer.fitView, div.wrapper.fitView {
  /* % instead of vh to prevent urlbar hiding */
  min-height: 100%;
  max-height: 100%;
  height: 100%;
  width: 100vw;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;

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

.wrapper {
  grid-column: 2 / span 1;
  grid-row: 2 / span 2;

  margin-left: 0;
  display: grid;
  grid-gap: 0;
}

.wrapper.top {
  grid-row: 2 / span 1;
}

.wrapper.bottom {
  grid-row: 3 / span 1;
}

#footerWrapper.fullWidth,
.wrapper.fullWidth,
.footer.fullWidth {
  grid-column: 1 / span 3;

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

/* any div directly inside a wrapper */
.wrapper > div {
  padding: 0.5rem;
  box-sizing: border-box;
}

#appWrapper {
  position: relative;
  max-width: 40rem;
  min-width: 15rem;
  width: 100%;

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

#appWrapper.resizing {
  outline: 0.3rem dashed var(--color-emphasis-fill);
  opacity: 0.8;
  background-color: var(--color-primary-fill);
}

#appWrapper.appWords {
  max-width: 50rem;
}

#appWrapper.appFullWidth, #appWrapper.appWords.appFullWidth {
  max-width: none;
  margin-left: 2%;
  margin-right: 2%;
}

h1 {
  font-weight: bold;
  font-size: 1.1rem;
}

#heading.tiny {
  grid-template-rows: minmax(min-content, max-content);
  padding: 0;
}

#headingWrapper {
  padding: 0.5rem;
  padding-bottom: 0;

  grid-row: 1;
  grid-column: 1 / span 3;

  display: flex;
  justify-content: center;
}

#headingWrapper.appFullWidth {
  display: none;
}

.widthLimit {
  padding: 0;
  width: 100%;
  max-width: 50rem;
}

#topWidthLimit {
  padding: 0;
}

#heading {
  font-size: 1.1rem;

  position: relative;
  display: grid;
  grid-gap: 0;
  /* logo gap title menu */
  grid-template-columns: auto 1rem 1fr auto;
  grid-template-rows: minmax(2.4rem, max-content);
}

.miniIcon {
  pointer-events: none; /* prevent drag */
  width: 100%;
}

#resizeIconImg {
  pointer-events: none;
  width: 1rem;
  height: 3rem;
}

#resizeIcon {
  display: inline;
  position: absolute;
  top: 50vh;
  right: 0;
  cursor: ew-resize;
  user-select: none;
  opacity: 0.6;
}

#resizeIcon.active {
  cursor: default;
  opacity: 1;
  display: none;
}

#expandIconImg {
  pointer-events: none;
}

#expandIcon {
  display: inline;
  cursor: pointer;
}

#expandIconOld {
  display: block;
  position: absolute;
  bottom: 0.5rem;
  left: calc(100% - 2rem);
  cursor: pointer;
}

#title {
  grid-column: 3 / span 1;
  grid-row: 1;
  text-align: left;
  overflow: hidden;
  padding: 2px; /* same as outline width, else clipped by overflow hidden */
}

#menu {
  grid-column: 4 / span 1;
  grid-row: 1;
  text-align: right;
  font-size: 1rem;

  position: absolute;
  top: 0;
  right: 0;
  max-height: calc(100vh - 1rem);

  z-index: 1000;
}

#outer.menuOpen {
  cursor: pointer;
}

div#menuOpen {
  cursor: default;
  position: relative;
  background-color: var(--color-primary-light);
  border: var(--dialog-border-width) solid var(--color-emphasis-border);
  font-size: 1rem;
  padding: 1rem 2rem 1rem 2rem;
}

#outer.fitView > #headingWrapper > #heading > #menu > div#menuOpen {
  max-height: calc(100vh - 1rem - 1rem - 1rem);
  overflow-y: auto;
}

.menuLine {
  width: 100%;
  min-width: 10rem;

  display: flex;
  align-items: flex-end;
}

.menuItem {
  position: relative; /* for pro mark on menu items */
  user-select: none;
  margin-bottom: 0.5rem;
  background-color: var(--color-primary-fill);
  padding: 0;
  display: flex;
}

.menuItem:active {
  background-color: var(--color-primary-border);
}

.menuItem.emphasis {
  background-color: var(--color-emphasis-fill);
  color: var(--color-emphasis-text);
}

.menuItem.emphasis:active {
  background-color: var(--color-emphasis-border);
}

.menuIcon {
  background-color: inherit;
}

.showLink,
.lightLink,
.howtoSeeItem > a {
  cursor: pointer;
  text-decoration-style: solid;
  text-decoration-line: underline;
  text-decoration-color: var(--color-link-underline);
  text-decoration-thickness: 0.16rem;
  text-underline-offset: 0.2em; /* em because offset depends on size of text */
}

.showLink {
  font-weight: bold;
}

.menuItem > .showLink {
  text-decoration: none;
  font-weight: normal;
  border: 0.15rem solid var(--color-primary-border);
  padding: 0.3rem;

  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.menuItemSmall > .showLink {
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.menuIcon > .showLink {
  padding: 0;
  border: none;
}

.menuItem.emphasis > .showLink {
  border: 0.15rem solid var(--color-emphasis-border);
  color: var(--color-emphasis-text);
}

.menuLine > .menuItem {
  padding: 0;
}

.menuNewSection {
  margin-top: 1rem;
}

.menuItemRight {
  margin-left: auto;
}

#loginAnchor {
  font-size: 1.1rem;
}

.menuItemMoreLeft {
  transform: translateX(-1rem);
}

.menuItemMoreRight {
  transform: translateX(1rem);
}

#menuButton,
#menuLogin {
  text-align: right;
  display: block;
  cursor: pointer;
}

#menuButton {
  padding: 0.3rem 0.3rem 0.3rem 0.3rem;
  background-color: var(--color-primary-fill);
  border: 0.15rem solid var(--color-primary-border);
}

#menuArrow, .likeMenuArrow {
  width: 1rem;
}

.likeMenuArrow {
  display: inline;
  margin: 0.2rem;
  margin-top: 0;
  margin-bottom: 0;
}

.menuArrowOld {
  padding: 0 0.2rem 0 0.2rem;
  font-size: 0.75rem;
  vertical-align: top;
  height: 100%;
  opacity: 1;
  color: var(--color-emphasis-border);
}

#menuHeader {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

#menuName {
  font-weight: bold;
}

.menuItemSpace {
  margin-top: 1rem;
}

#menuNameAnchor {
  text-align: center;
}

#menuHeader > #role {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

#menuSpirit {
  pointer-events: none;
  padding-top: 1rem;

  display: grid;
  grid-gap: 0;
  grid-template-columns: 3rem 3rem 3rem;
  grid-template-rows: 1fr;
}

#menuDark, .menuItemDark {
  border: inherit;
  border-radius: 50%;
  background-color: inherit;
}

#menuDark.down,
.menuItemDark.down {
  background-color: var(--color-primary-border);
}

.menuItemDark {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;

  padding: 0;

  display: flex;
  justify-content: center;
}

#menuDark {
  visibility: var(--has-dark);
  padding: 0;
}

#tinyLogoWrapper {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 998;
}

#tinyLogoAnchor {
  display: inline-block;
}

#logoAnchor {
  display: flex;
  align-items: center;
}

#logoWrapper {
  grid-column: 1 / span 1;
  grid-row: 1;
  text-align: left;
  vertical-align: top;
  padding-top: 2px; /* to match #title */
}

.logoImg {
  height: 1.1rem;
  width: 1.1rem;
}

.logoImg > svg {
  height: 100%;
  width: 100%;
}

/* rect is the bg square, paths are foreground symbol */

.logoImg > svg > rect,
.logoImg > svg > path,
#reportLogoImg > svg > rect,
#reportLogoImg > svg > path {
  /* ! because need color in orig svg file and also to overrides when inlined in html (for dark) */
  fill: var(--color-logo-fg) !important;
}

.logoImg > svg > #rect2065,
#reportLogoImg > svg > #rect2065 {
  /* ! because need color in orig svg file and also to overrides when inlined in html (for dark) */
  fill: var(--color-logo-bg) !important;
  stroke: var(--color-logo-bg) !important;
}

.site {
  font-weight: bold;
}

#site {
  display: inline;
  margin-left: 0.2rem;
}

#footerLeft {
  padding: 0;
  grid-column: 1 / span 1;
  grid-row: 5 / span 1;
  background-color: var(--color-primary-fill);
}

#footerRight {
  padding: 0;
  grid-column: 3 / span 1;
  grid-row: 5 / span 1;
  background-color: var(--color-primary-fill);
}

#footerWrapper {
  grid-row: 5 / span 1;

  padding: 0;
  background-color: var(--color-primary-fill);
}

#footerWrapper.appFullWidth {
  display: none;
}

#footer {
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;

  margin-top: 0;
  background-color: var(--color-primary-fill);
  font-size: 0.9rem;

  display: grid;
  grid-gap: 0.5rem;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;
}

#footerMenu {
  grid-column: 1 / span 1;
  grid-row: 1 / span 1;

  margin-left: 0.5rem;
  text-align: left;
}

#footerBlurb {
  grid-column: 2 / span 1;
  grid-row: 1 / span 1;

  text-align: center;
}

#footerLegal {
  margin-right: 0.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  flex-direction: column;
}

#message, #result {
  font-size: 1.2rem;
}

#messageWrapper > #result {
  position: absolute;
  top: 1rem;
  right: 0;

  max-width: 50rem;

  font-size: 1rem;
  font-weight: bold;

  border-right: 0.26rem solid var(--color-secondary-text);
  padding-right: 0.5rem;

  display: flex;
  justify-content: flex-end;
  text-align: right;
}

button.down {
  background-color: var(--color-primary-border);
}

button.up {
  background-color: var(--color-primary-fill);
}

button.emphasis.down {
  background-color: var(--color-emphasis-border);
}

button.emphasis.up {
  background-color: var(--color-emphasis-fill);
}

*.vacuum {
  position: absolute;
  left: -9999px;
}

*.invisible {
  visibility: hidden;
}

*.disabled {
  pointer-events: none;
  opacity: 0.3;
}

img.smallStaffImg {
  pointer-events: none;

  min-height: 1.8rem;
  max-height: 1.8rem;
}

img.smallRhythmImg {
  opacity: 0.85;
  pointer-events: none;

  min-height: 1.1rem;
  max-height: 1.1rem;
}

img.rhythmImgButton {
  opacity: var(--rhythm-img-opacity);
  pointer-events: none;

  height: 2rem;
  min-height: 2rem;
  max-height: 2rem;
}

img.rhythmImgNew {
  opacity: var(--rhythm-img-opacity);
  pointer-events: none;

  height: 2.1rem;
  min-height: 2.4rem;
  max-height: 2.4rem;
}

img.rhythmImg {
  user-select: none;
  opacity: var(--rhythm-img-opacity);
  pointer-events: none;

  height: 80%;
}

img.compoundRhythmImg {
  opacity: var(--rhythm-img-opacity);
  pointer-events: none;

  min-height: 1.3rem;
  max-height: 1.3rem;
  transform: translate(0.2rem, -0.25rem);
}

img.sysLine, img.sysStaff {
  box-sizing: border-box;
  height: auto;
  padding: 20%;
  width: 100%;
}

img.sysLine[alt="One Half Rest"],
img.sysLine[alt="One Whole Rest"],
img.sysStaff[alt="One Half Rest"],
img.sysStaff[alt="One Whole Rest"] {
  padding-top: 40%;
  padding-bottom: 0;
}

img.sysLine.barStart {
  padding: 40% 20% 0 20%;
}

img.sysStaff.barStart {
  padding: 0;
}

.unselected > img.rhythmImg {
  opacity: 0.4;
}

img.rhythmImgBox {
  box-sizing: border-box;

  opacity: var(--rhythm-img-opacity);
  pointer-events: none;

  display: flex;

  /* bg images are for container holding a 60% height rhy img */
  /* Want top,bot padding 20% of container == 3 parts of image + 2 parts margin. */
  padding: 20%;
  width: 100%;
}

.halfBeat.sysLine > div > img.rhythmImg,
.halfBeat.sysStaff > div > img.rhythmImg,
.halfBeat.sysLine > div > img.rhythmImgBox,
.halfBeat.sysStaff > div > img.rhythmImgBox {
  padding-top: 40%;
  padding-bottom: 40%;
}

.halfBeat > div > img.rhythmImg[alt="Blank"] {
  padding-top: 80%;
  padding-bottom: 60%;
}

.toggle {
  cursor: pointer;
}

.iconButton {
  height: 4rem;
  min-height: 2rem;
  width: 6rem;
  min-width: 3rem;
}

.smallIconButton {
  height: 2rem;
  min-height: 1rem;
  width: 3rem;
  min-width: 1.5rem;
}

.iconButton.menuIconButton {
  height: 3rem;
  min-height: 3rem;
  width: 3rem;
  min-width: 3rem;
}

.button {
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-primary-text);
  /* Important for actual buttons, because the default button border adds padding. */
  border: 0.15rem solid var(--color-primary-border);
  font-family: verdana, sans-serif;
  display: inline-block;
  padding: 0.3rem;
}

.controlButton {
  min-height: 4rem;
  min-width: 6rem;
  max-width: 6rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.controlB, .controlB.up {
  display: flex;
  justify-content: center;
  align-items: center;
}

.controlI {
  width: 1rem;
  height: 1rem;
  margin-right: 0.2rem;
}

span.clean {
  /* Fill a button so it lays out normally. */
  display: block;
  width: 100%;
  height: 100%;
}

div.emphasis, span.emphasis, strong.emphasis {
  color: var(--color-emphasis-text);
}

.button.emphasis {
  border: 0.15rem solid var(--color-emphasis-border);
  background-color: var(--color-emphasis-fill);
  color: var(--color-emphasis-text);
}

.button.emphasis.down {
  background-color: var(--color-emphasis-border);
}

.button.emphasis > .clean > div {
  color: var(--color-emphasis-text);
}

#footerMenu > div {
  padding-bottom: 0.7rem;
}

#footerMenu > div:last-child {
  padding-bottom: 0;
}

.rhythmButton {
  cursor: pointer;
  padding: 0;
  height: var(--height-rhythm-img);
  width: var(--width-rhythm-img);
}

.selected {
  border: 0.15rem solid var(--color-emphasis-border);
}

.unselected {
  border: 0.15rem solid var(--color-primary-border);
}

input[type="range"] {
  -webkit-appearance: none;
  height: 20px;

  cursor: pointer;
  outline: none;
  outline-style: none;
  box-shadow: none;
  border-color: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  background-color: var(--color-primary-fill);
  height: 4px;
  border: none;
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 30%;
  border: 1px solid var(--color-primary-text);
  background-color: var(--color-emphasis-border);
  opacity: 0.6;
  margin-top: -6px;
}

input[type="range"]::-moz-range-track {
  background-color: var(--color-primary-fill);
}

input[type="range"]::-moz-range-progress {
  background-color: var(--color-emphasis-border);
}

input[type="range"]::-ms-fill-upper {
  background-color: var(--color-primary-fill);
}

input[type="range"]::-ms-fill-lower {
  background-color: var(--color-emphasis-border);
}

.flexBottomRight {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  height: 100%;
  margin-top: auto;
}

.flexRight {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

.flexLeft {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}

.flexCenter {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.flex {
  display: flex;
  padding: 0;
}

.flex0 {
  display: inline-flex;
  padding: 0;
  flex-wrap: wrap;
}

.flexCenterHor {
  display: flex;
  justify-content: center;
  padding: 0;
}

.flexMiddle {
  display: flex;
  align-items: center;
  padding: 0;
}

.pushRight {
  margin-left: auto;
}

.pushLeft {
  margin-left: 0;
}

.fillHeight {
  height: 100%;
}

.filler {
  width: 100%;
}

.guideBar {
  user-select: none;
  pointer-events: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.guideHBeat, .guideBarStart {
  padding: 0;
  margin: 0;
  border: none;
  width: 100%;
  height: 100%;
  display: flex;
}

.beatGuide {
  /* <100% else thin line between halves at some smaller sizes (ff,chrom) */
  --hun: calc(100% - 1px);
  --zer: 1px;
  box-shadow: 0 0 0.2rem 0.2rem var(--color-emphasis-fill);
  z-index: 999;
}

.beatGuide[data-pulse="0"],
.beatGuide.pulse[data-pulse="0"] {
  /* empty right */
  clip-path: polygon(-20% -20%, var(--hun) -20%, var(--hun) 120%, -20% 120%);
}

.beatGuide[data-pulse="1"] {
  /* empty left */
  clip-path: polygon(var(--zer) -20%, 120% -20%, 120% 120%, var(--zer) 120%);
}

.beatGuide.pulse,
.beatGuide.pulse[data-pulse="1"] {
  /* empty left,right */
  clip-path: polygon(var(--zer) -20%, var(--hun) -20%, var(--hun) 120%, var(--zer) 120%);
}

.beatGuide.pulse[data-pulse="5"] {
  /* empty left */
  clip-path: polygon(var(--zer) -20%, 120% -20%, 120% 120%, var(--zer) 120%);
}

.beatGuideFade,
.beatGuideFade.pulse[data-pulse="0"],
.beatGuideFade.pulse[data-pulse="5"] {
  box-shadow: none;
  z-index: auto;
}

.beatGuideFade.pulse {
  box-shadow: none;
  clip-path: none;
}

.highlight {
  box-shadow: 0 0 1rem 1rem var(--color-emphasis-border);
  transition: box-shadow 1s;
}

.fade {
  box-shadow: none;
}

svg.svgWords {
  background-color: var(--color-primary-fill);
}

text.svgWordsText {
  fill: var(--color-primary-text);
}

text.svgClefText, path.svgPath {
  fill: var(--color-primary-rhythm);
}

path.svgPathGClef {
  stroke: var(--color-primary-rhythm);
}

.words {
  display: flex;
  justify-content: center;
  align-items: center;

  height: 100%;

  pointer-events: none;
  user-select: none;

  font-size: 1rem;
  font-weight: bold;
}

@media screen and (min-width: 0) and (max-width: 500px) {
  #heading {
    /* logo gap title menu */
    grid-template-columns: auto 0.5rem 1fr auto;
  }

  .words.numbers {
    margin-left: 4%;
    font-size: 1rem;
    justify-content: flex-start;
  }
}

@media screen and (min-width: 501px) and (max-width: 640px) {
  .words.numbers {
    margin-left: 5%;
    font-size: 1rem;
    justify-content: flex-start;
  }
}

@media screen and (min-width: 641px) and (max-width: 1024px) {
  .words.numbers {
    margin-left: 10%;
    font-size: 1.15rem;
    justify-content: flex-start;
  }
}

@media screen and (min-width: 1024px) {
  .words.numbers {
    margin-left: 10%;
    font-size: 1.2rem;
    justify-content: flex-start;
  }
}

#show,
#system {
  padding: 0.2rem;
}

#showRadios,
#systemRadios,
.optionBody {
  padding: 0.2rem;
  margin-top: 0.2rem;
}

.setupOption.invisible {
  padding: 0;
  margin: 0;
}

.setupOption {
  width: 100%;
  max-width: 46rem;
  padding: 0.2rem;
  margin-top: 1.5rem;
}

.setupOption:first-child {
  margin-top: 0;
}

.setupControl {
  margin-top: 0.5rem;
}

.optionHeading {
  font-weight: bold;
}

.tempoItalian {
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

img.animal {
  width: 3rem;
}

img.menuAnimal {
  width: 3rem;
  grid-column: 2 / span 1;
  grid-row: 1 / span 1;
}

img.flipHleft {
  transform: rotateY(0.5turn);
}

img.setupInstr {
  pointer-events: none;
  width: 2.4rem;
  padding: 0.2rem;
}

.toggleButton.selected {
  opacity: 1;
}

.toggleButton, .multiToggleButton {
  opacity: 0.7;
  padding: 0.8rem;
  margin: 0.2rem;
}

.toggleInstr {
  padding: 0.4rem;
}

.toggleButtonText {
  min-width: 4rem;
  height: 2rem;

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

.beatGuideText {
  display: inline-block;
  min-width: 4rem;
}

.numberInputWrapper {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
}

.numberInputText {
  user-select: none;
  font-size: 1.5rem;
  width: 2.4rem;
  display: inline-block;
  text-align: center;
}

button.numberInputButton.numberInputMore {
  font-size: 3rem;
  width: 4.2rem;
  height: 4.2rem;
}

button.numberInputButton {
  touch-action: manipulation;
  user-select: none;

  border: 0.12rem solid var(--color-primary-border);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--color-emphasis-border);
  width: 3.2rem;
  height: 3.2rem;
}

button.numberInputButton.down {
  background-color: var(--color-primary-border);
}

.infoDropButton {
  background-color: var(--color-primary-fill);
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  font-size: 1rem;
  margin: 0.4rem;
}

.infoDropButton.down {
  background-color: var(--color-primary-light);
  color: var(--color-secondary-fill);
  font-size: 1.6rem;
  margin-bottom: 0;
  margin-top: 0;
}

.infoDrop {
  display: flex;
  flex-direction: column;

  margin-left: 2rem;
}

.infoDropInner {
  margin-right: auto;

  padding: 1rem;
  border: 0.18rem dotted var(--color-secondary-text);
}

.infoLine {
  margin-bottom: 0.4rem;
}

#infoSystem {
  display: grid;
  grid-gap: 0.6rem;
  grid-template-columns: auto auto;
}

#infoBoxes {
  display: flex;
}

#infoStaff, #infoLine {
  display: flex;
}

.infoRhythm {
  height: 2.4rem;
  width: 2.4rem;
  background-color: var(--color-primary-fill);

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

#infoStaff > .infoRhythm, #infoLine > .infoRhythm {
  background-color: var(--color-primary-light);
}

.infoBarStart {
  height: 2.4rem;

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

img.infoRhythmImg {
  pointer-events: none;

  height: 65%;
}

.flexTwoCol {
  grid-column: 1 / span 2;
  display: flex;
  justify-content: center;
}

div.infoTimeSignature {
  height: 100%;

  display: grid;
  grid-gap: 0;
  grid-template-columns: auto;
  grid-template-rows: 50% 50%;
}

.infoTimeSignatureNum {
  display: flex;
  flex-direction: column;

  font-weight: bold;
  margin: 0;
  margin-top: 7%;
}

.infoTimeSignatureNumTop {
  flex-direction: column-reverse;
  margin-bottom: 7%;
}

img.infoTimeSignature {
  height: 60%;
}

img.infoClef {
  height: 100%;
}

.infoBarEnd {
  height: 2.4rem;

  display: flex;
  align-items: center;
}

img.infoBarSymbol {
  height: 100%;
  margin-right: 0.1rem;
}

#infoDropLinkWrapper {
  position: relative;
}

#infoDropLink {
  position: absolute;
  top: 0;
  left: 0;
  margin-left: 0;
  z-index: 999;
  background-color: var(--color-primary-light);
}

#infoDropLive {
  position: absolute;
  top: 100%;
  right: 0;
  margin-left: 0;
  z-index: 999;
  background-color: var(--color-primary-light);
}

#infoDropLiveB {
  margin-right: 0.2rem;
  transform: translateY(-0.1rem);
}

img.badge {
  user-select: none;
  cursor: pointer;
  height: 5rem;
  width: 5rem;
}

img.badge.zoom {
  height: 12rem;
  width: 12rem;
}

img.buttonIcon, img.buttonIconLarge {
  pointer-events: none;
  opacity: 0.8;
}

img.buttonIconSmall, img.buttonIconMenu {
  pointer-events: none;
}

.buttonIconMenu {
  max-height: 80%;
  max-width: 80%;
}

#menuDark > .clean > div > .buttonIconMenu {
  max-width: 60%;
  max-height: 60%;
}

.buttonIconSmall {
  max-height: 96%;
  max-width: 96%;
}

img.buttonIcon {
  max-height: 50%;
  max-width: 50%;
}

img.buttonIconLarge {
  max-height: 80%;
  max-width: 80%;
}

#dataWrapper, #data {
  display: none;
}

.sideIcon {
  margin-left: 0.2rem;
  vertical-align: bottom;
  width: 1.2rem;
  height: 1.2rem;
}

.setupRhythmButtonWrapper {
  grid-column: 1 / span 1;
  grid-row: 2 / span 1;
}

.setupRhythmButtonGroup {
  margin-bottom: 1.4rem;

  display: grid;
  grid-gap: 0.4rem;
  grid-template-columns: repeat(auto-fill, var(--width-rhythm-img));
}

.setupRhythmButtonGroup.empty {
  margin-bottom: 0;
}

#setupRhythmButtonsWrapper.slash8 > .setupRhythmButtonGroup > .rhythmButton.slash4Only {
  display: none;
}

#setupRhythmButtonsWrapper.simple > .setupRhythmButtonGroup > .rhythmButton.compoundOnly {
  display: none;
}

#setupRhythmButtonsWrapper.compound > .setupRhythmButtonGroup > .rhythmButton.simpleOnly {
  display: none;
}

.toggleArrow {
  font-size: 0.75rem;
  vertical-align: top;
  opacity: 0.5;
}

.toggleArrow.opened {
  opacity: 0.2;
}

.editImg {
  width: 1rem;
  /* For epiphany, else too high. */
  height: 1rem;
  margin: 0.2rem;
}

.editImg.opened {
  width: 1.4rem;
  /* For epiphany, else too high. */
  height: 1.4rem;
}

.square {
  width: 0;
  padding-bottom: 100%;
}

.bgLine, .bgStaff {
  background-position: center;
  background-size: auto 100%;
  background-repeat: repeat;
}

.bgLine {
  background-image: url("/static/131/images/staffline.svg");
}

.bgStaff {
  background-image: url("/static/131/images/stafflines.svg");
}

.bgLine.bgEnd, .bgStaff.bgEnd {
  background-image: url("/static/131/images/barlineLine.svg"), url("/static/131/images/staffline.svg");
  background-position: right, center;
  background-repeat: no-repeat, repeat;
}

.bgStaff.bgEnd {
  background-image: url("/static/131/images/barline.svg"), url("/static/131/images/stafflines.svg");
}

/* this means when ele is second last child and a .halfBeat */
.halfBeat:nth-last-child(2) > .bgLine.bgEnd,
.halfBeat:nth-last-child(3) > span > .bgLine.bgEnd {
  /* the second half of the beat is visible and has the end marker */
  background-image: url("/static/131/images/staffline.svg");
}

.halfBeat:nth-last-child(2) > .bgStaff.bgEnd,
.halfBeat:nth-last-child(3) > span > .bgStaff.bgEnd {
  /* the second half of the beat is visible and has the end marker */
  background-image: url("/static/131/images/stafflines.svg");
}

.bgStaff.phraseEnd {
  background-image: url("/static/131/images/barlineWithGap.svg"), url("/static/131/images/barlineEndWithGap.svg"), url("/static/131/images/stafflines.svg");
  background-position: right, right, center;
  background-repeat: no-repeat, no-repeat, repeat;
}

.bgLine.phraseEnd {
  background-image: url("/static/131/images/barlineLineWithGap.svg"), url("/static/131/images/barlineEndLine.svg"), url("/static/131/images/staffline.svg");
  background-position: right, right, center;
  background-repeat: no-repeat, no-repeat, repeat;
}

.halfBeat:nth-last-child(2) > .bgLine.phraseEnd {
  /* the second half of the beat is visible and has the end marker */
  background-image: url("/static/131/images/staffline.svg");
}

.halfBeat:nth-last-child(2) > .bgStaff.phraseEnd {
  /* the second half of the beat is visible and has the end marker */
  background-image: url("/static/131/images/stafflines.svg");
}

.sliderFull {
  cursor: pointer;
  width: 100%;
  height: 1.2rem;
  padding: 0;
  background-color: var(--color-primary-fill);
  box-sizing: border-box;
}

.sliderFullV {
  cursor: pointer;
  height: 100%;
  width: 1.2rem;
  padding: 0;
  margin-bottom: 0.5rem;
  background-color: var(--color-primary-fill);
  box-sizing: border-box;
}

.sliderPart {
  pointer-events: none;
  padding: 0;
  height: 100%;
  background-color: var(--color-primary-fill);
  border: 0.12rem solid var(--color-emphasis-border);
  border-right-width: 0.24rem;
  box-sizing: border-box;
}

.sliderPartV {
  pointer-events: none;
  padding: 0;
  width: 100%;
  background-color: var(--color-primary-fill);
  border: 0.12rem solid var(--color-emphasis-border);
  box-sizing: border-box;
}

.normal {
  font-weight: normal;
}

#ttButton {
  padding: 0.6rem;
  margin-bottom: auto;
  border: 0.12rem solid var(--color-emphasis-border);
}

#tgButton {
  margin-top: 0.5rem;
  text-align: right;
  margin-right: 0.5rem;
}

.info {
  width: calc(100% - 1rem);
  max-width: 50rem;
  padding: 0.5rem 0 0.5rem 0;
  margin-bottom: 0.5rem;

  background-color: var(--color-primary-fill);
  border-radius: 0.5rem 0.5rem 2rem 2rem;

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

.darkButtonImg {
  pointer-events: none;
  width: 1.2rem;
}

#darkButtonImg {
  width: 1.4rem;
}

#darkButton {
  visibility: var(--has-dark);
  border: none;
  padding: 0;
  margin-top: 1rem;
}

img.externalIcon {
  width: 0.8rem;
}

#seeWrapper {
  margin-top: 2rem;
  width: 100%;
  max-width: 50rem;
  display: flex;
  justify-content: flex-end;
}

.seeItem {
  padding: 0.3rem;
  margin: 0.3rem;
}

.seeAlso {
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.howtoSeeItem {
  margin: 0.3rem;
  text-align: right;
  padding: 0.3rem;
  padding-left: 1rem;
}

.italic {
  font-style: italic;
}

.bold {
  font-weight: bold;
}

.nb {
  background-color: var(--color-nb);
}

.proMark, .proMarkMenu, .proMarkMenuItem, .proMarkInline {
  font-size: 0.8rem;
  border-radius: 50%;
  background-color: var(--color-emphasis-fill);
  color: var(--color-emphasis-text);
  width: 1.2rem;
  height: 1.2rem;

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

.proMark {
  position: absolute;
  top: -0.6rem;
  left: 50%;
  transform: translateX(-50%);
}

.proMarkMenu {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
}

.proMarkMenuItem {
  position: absolute;
  top: 50%;
  transform: translate(-40%, -50%);
  left: 0;
}

.proMarkInline {
  padding: 0.25rem 0.35rem 0.25rem 0.35rem;
  display: inline;
  margin: 0;
}

#setupEx {
  position: absolute;
  bottom: -0.5rem;
  left: 0.5rem;
  background-color: var(--color-primary-fill);
  font-size: 0.9rem;
  opacity: 0.8;
}

.liveIndicator {
  font-size: 0.9rem;
  padding: 0.5rem;
}

.liveIndicator::before {
  content: "\2022";
  margin-right: 0.15rem;
}

.fadeMsg {
  transition-property: opacity;
  transition-duration: 1s;
  opacity: 0;
}

#bannerWW {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1001;
}

#bannerW {
  pointer-events: auto; /* because parent none */
  position: relative;
  background-color: var(--color-primary-light);
  max-width: 40rem;
  border-top: var(--dialog-border-width) solid var(--color-secondary-text);
  border-radius: 0 0 1rem 1rem;
  padding: 1rem;
  display: flex;
  justify-content: center;
}

#bannerX {
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;

  font-size: 1.1rem;
  background-color: var(--color-primary-light);
  color: var(--color-secondary-text);
  opacity: 0.8;

  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1002;
}

#bannerW:hover > #bannerX {
  display: flex;
}

.smallEditButton {
  border-radius: 0.3rem;
  width: 2rem;
}

.avatar {
  position: relative; /* for layers */
  width: 4.4rem;
  height: 4.4rem;
  margin-right: 0.5rem;
  background-color: var(--color-primary-fill);
  border: 1px solid var(--color-emphasis-border);
  border-radius: 50%;
}

.avaLayer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  border-radius: 50%;
}

.avaHead {
  position: static;
  width: 100%;
  height: 100%;
  display: flex;
}

.avaLayer > img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

#menuSpirit > .avatar {
  grid-column: 2 / span 1;
}

#seeExplorer {
  grid-column: 1 / span 2;
}

.eye {
  cursor: pointer;
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);

  width: 1.7rem;
  height: 1.7rem;

  padding: 0.25rem;
  border: none;

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

.eye.up {
  background-color: var(--color-transparent);
}

.eyeIcon {
  pointer-events: none;
  width: 100%;
}

#bannerWW.retracted,
#bannerX.retracted,
#heading.retracted,
#title.retracted,
button.retracted,
.infoDrop.retracted,
*.retracted {
  display: none;
}
