#island-wrapper {
  position: fixed;
  left: 5%;
  z-index: 999;
  width: 90%;
  bottom: 0;
  transform: translateY(65px);
  transition: transform 500ms;

  /* extend hover area upwards on tall enough screens */
  @media (min-height: 640px) {
    padding-top: 40px;
  }

  /* always visible on small screens */
  @media (max-width: 949px) {
    width: 100%;
    left: 0;
    transform: translateY(0);
  }
}

#island-wrapper:hover,
#island-wrapper:focus,
#island-wrapper.open {
  transform: translateY(0);
}

#island-wrapper:hover #island,
#island-wrapper:focus #island,
#island-wrapper.open #island {
  border-color: #fff;
}

#island-wrapper:hover #island::before,
#island-wrapper:focus #island::before,
#island-wrapper.open #island::before {
  border-top-color: #fff;
  border-left-color: #fff;
}

nav#island {
  position: relative;
  margin: 0;
  background-color: #00002ff0;
  color: #fff;
  padding: 1rem 2rem;
  border: 3px solid #fff7;
  border-radius: 42px 42px 0 0;
  border-bottom: 0;
  font-size: 1.1rem;

  @media (max-width: 949px) {
    max-width: none;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
}

nav#island::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -24px;
  left: calc(50% - 10px);
  width: 20px;
  height: 20px;
  rotate: 45deg;
  background-color: transparent;
  border: 3px solid #fff7;
  border-radius: 3px;
  border-right: 0;
  border-bottom: 0;

  @media (max-width: 949px) {
    display: none;
  }
}

ul#menu {
  position: relative;
  display: flex;
  flex-direction: rows;
  align-items: flex-end;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;

  @media (max-width: 949px) {
    gap: 1rem;
  }
}

#menu li {
  position: relative;
  z-index: 1;
  text-align: center;
  white-space: nowrap;
}

#menu li > a,
#menu li > span {
  padding: 0 0.3rem;
}

ul#page-list {
  display: none;
  position: absolute;
  left: -50%;
  bottom: 3rem;
  margin: 0;
  padding: 1rem;
  max-height: 80vh;
  border: 3px solid #fff7;
  border-radius: 21px 21px 0 0;
  border-bottom: 0;
  background-color: #00002ff0;
  list-style: none;

  @media (max-height: 640px) {
    max-height: 60vh;
  }
}

#page-list.enabled {
  display: block;
  overflow-y: scroll;
}

#page-list li {
  text-align: left;
}

#page-list span {
  color: #999;
}

#page-list span.category {
  display: block;
  font-style: italic;
}

#page-list .child {
  margin-left: 1rem;
  white-space: nowrap;
}

#island a {
  text-underline-offset: 0.5rem;
  text-decoration-color: #333;
}

#island a:hover,
#island a:focus,
#island button:hover,
#island button:focus,
#island button:active {
  text-underline-offset: 0.7rem;

  border-radius: 4px;
  outline: 3px solid #fd5;
  outline-offset: 1px;
}

#island a span.page-label {
  @media (max-width: 1279px) {
    display: none;
  }
}

#island .no-link {
  color: #999;
}

#island p {
  margin: 0;
  color: #999;
}

#island button {
  cursor: pointer;
  background-color: transparent;
  color: #fff;
  font-size: 0.9rem;
  padding: 2px 8px 3px;
  border: 3px solid #fff;
  border-radius: 4px;
  min-width: 6rem;

  @media (max-width: 949px) {
    min-width: auto;
  }
}

#island button:hover,
#island button.enabled {
  background-color: #fff;
  color: #000;
}

#island button span.icon {
  display: inline-block;
  font-size: 1rem;
}

#island button span:not(.icon) {
  @media (max-width: 949px) {
    display: none;
  }
}
