body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: hsl(240 10% 3.9%);
  background: hsl(0 0 100%);
  margin: 0;
}

*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
}

.full-screen {
  position: absolute;
  width: 100%;
  height: 100%;
}

.loadui {
    display: flex;
    flex-direction: column;
    text-align: center;
    z-index: 2;
    padding: 2rem 1rem;
    background-image: url(/bevel.svg);
    background-color: hsl(0 0 100%);
    background-position: center;
}

h4 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    margin: 0;
}

h2 {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    margin: 0;
}

p {
    font-weight: 700;
    margin: 0;
}

.button {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.25rem;
    border-radius: calc(0.5rem - 2px);
    color: hsl(0 0 98%);
    background-color: hsl(240 5.9% 10% / 0.4);
}

.button:hover {
    background-color: hsl(240 5.9% 10% / 0.6);
}

input.button[type="checkbox"] {
    appearance: none;
    margin: 0;
}

.checkbox {
    background-position: center;
    background-size: 2.25rem;
    background-repeat: no-repeat;
}

.icon {
    width: 100%;
    height: 100%;
    color: inherit;
    background-color: currentColor;
    background-size: contain;
}

#outfit-switch { background-image: url("/avatar.svg"); }
#outfit-switch:checked { background-image: url("/apparel.svg"); }

.carousel {
    position: absolute;
    width: 100%;
    height: 4rem;
    bottom: 1rem;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.carousel-item {
    height: 4rem;
    width: 4rem;
    margin: auto 4px;
    overflow: hidden;
    border: double 4px #008080;
    border-radius: calc(0.5rem - 2px);
    border-color: hsl(240 10% 3.9% / 0.4);
    background-position: center;
    background-size: contain;
    background-color: hsl(240 5.9% 10% / 0.4);
    background-repeat: no-repeat;
    transition: .6s;
}

.carousel input[type="radio"] {
    background-color: hsl(240 5.9% 10% / 0.4);
    appearance: none;
}

.carousel-item:checked {
    border: solid 3px hsl(0 0 100%);
}

.carousel-item:hover {
    border-color: hsl(0 0 100%);
}

.cube-container {
    width: 168px;
    height: 168px;
    padding: 36px;
    margin: auto;
}

.cube {
    position: absolute;
    width: 96px;
    height: 96px;
    animation: cube 2s infinite ease;
    transform-style: preserve-3d;
}

.cube > div {
    width: 100%;
    height: 100%;
    position: absolute;
    border: 2px solid hsl(240 6% 10%);
    background-color: hsl(240 6% 10% / 30%);
}

.cube div:nth-of-type(1) {
    transform: translateZ(-48px);
}

.cube div:nth-of-type(2) {
    transform: rotateY(-270deg) translateX(50%);
    transform-origin: top right;
}

.cube div:nth-of-type(3) {
    transform: rotateY(270deg) translateX(-50%);
    transform-origin: center left;
}

.cube div:nth-of-type(4) {
    transform: rotateX(90deg) translateY(-50%);
    transform-origin: top center;
}

.cube div:nth-of-type(5) {
    transform: rotateX(-90deg) translateY(50%);
    transform-origin: bottom center;
}

.cube div:nth-of-type(6) {
    transform: translateZ(48px);
}

@keyframes cube {
    0% { transform: rotate(45deg) rotateX(-25deg) rotateY(25deg); }
    50% { transform: rotate(45deg) rotateX(-385deg) rotateY(25deg); }
    100% { transform: rotate(45deg) rotateX(-385deg) rotateY(385deg); }
}

.boxes {
  --size: 48px;
  --duration: 800ms;
  height: calc(2 * var(--size));
  width: calc(3 * var(--size));
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: calc(-1.5 * var(--size));
  transform-style: preserve-3d;
  transform-origin: -25% -25%;
  transform: rotateX(60deg) rotateZ(45deg) rotateY(0deg) translateZ(0px);
}

.boxes .box {
  width: var(--size);
  height: var(--size);
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
}

.boxes .box > div {
  --top: auto;
  --right: auto;
  --bottom: auto;
  --left: auto;
  --translateZ: calc(0.5 * var(--size));
  --rotateY: 0deg;
  --rotateX: 0deg;
  width: 100%;
  height: 100%;
  position: absolute;
  top: var(--top);
  right: var(--right);
  bottom: var(--bottom);
  left: var(--left);
  transform: rotateY(var(--rotateY)) rotateX(var(--rotateX)) translateZ(var(--translateZ));
  background-color: hsl(240 6% 10% / 0.3);
  border: 1px solid hsl(240 6% 10%);
}

.boxes .box:nth-child(1) {
  transform: translate(100%, 0);
  animation: box1 var(--duration) linear infinite;
}

.boxes .box:nth-child(2) {
  transform: translate(0, 100%);
  animation: box2 var(--duration) linear infinite;
}

.boxes .box:nth-child(3) {
  transform: translate(100%, 100%);
  animation: box3 var(--duration) linear infinite;
}

.boxes .box:nth-child(4) {
  transform: translate(200%, 0);
  animation: box4 var(--duration) linear infinite;
}

.boxes .box > div:nth-child(1) {
  --top: 0;
  --left: 0;
}

.boxes .box > div:nth-child(2) {
  --right: 0;
  --rotateY: 90deg;
}

.boxes .box > div:nth-child(3) {
  --rotateX: -90deg;
}

.boxes .box > div:nth-child(4) {
  --top: 0;
  --left: 0;
  --translateZ: calc(-1.5 * var(--size));
  background-color: hsl(240 6% 10% / 0.1);
  border: 1px solid hsl(240 6% 10% / 0.05);
}

@keyframes box1 {
  0%, 50% { transform: translate(100%, 0); }
  100% { transform: translate(200%, 0); }
}

@keyframes box2 {
  0% { transform: translate(0, 100%); }
  50% { transform: translate(0, 0); }
  100% { transform: translate(100%, 0); }
}

@keyframes box3 {
  0%, 50% { transform: translate(100%, 100%); }
  100% { transform: translate(0, 100%); }
}

@keyframes box4 {
  0% { transform: translate(200%, 0); }
  50% { transform: translate(200%, 100%); }
  100% { transform: translate(100%, 100%); }
}
