.outer-grid {
  left: 50%;
  margin: 0;
  width: calc(100vw - 16px);
  max-width: calc(100vw - 16px);
  transform: translateX(-50%);
  z-index: 100;
  cursor: pointer;
  transition:
    left 0.5s ease,
    bottom 0.5s ease,
    transform 0.5s ease,
    width 0.5s ease,
    max-width 0.5s ease;
}

.outer-grid .container {
  overflow: hidden;
  box-sizing: border-box;
  transition:
    min-width 0.5s ease,
    max-width 0.5s ease,
    width 0.5s ease,
    min-height 0.5s ease,
    max-height 0.5s ease,
    height 0.5s ease,
    padding 0.5s ease,
    border-radius 0.5s ease,
    background-color 0.3s ease;
}

.outer-grid .small {
  opacity: 1;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.outer-grid.is-compact {
  left: calc(100% - 16px);
  bottom: 16px;
  width: auto;
  max-width: none;
  transform: translateX(-100%);
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 5px;
}

.outer-grid.is-compact .container {
  min-width: 14px;
  max-width: 14px;
  width: 14px;
  min-height: 14px;
  max-height: 14px;
  height: 14px;
  padding: 0;
  border-radius: 2px;
}

.outer-grid.is-compact .small {
  opacity: 0;
}

h1.identity-toggle {
  box-sizing: border-box;
  cursor: pointer;
  transition:
    top 0.5s ease,
    left 0.5s ease,
    transform 0.5s ease,
    width 0.5s ease,
    max-width 0.5s ease,
    height 0.5s ease,
    padding 0.5s ease;
}

h1.identity-toggle.is-compact {
  position: fixed;
  top: calc(100% - 16px);
  left: 16px;
  transform: translateY(-100%);
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  min-height: 14px;
  max-height: 14px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid white;
  border-radius: 2px;
  font-size: 0;
  line-height: 0;
  color: transparent;
  z-index: 101;
}

h1.identity-toggle.is-compact small {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .outer-grid,
  .outer-grid .container,
  .outer-grid .small,
  h1.identity-toggle {
    transition: none;
  }
}
