.topbar,
.top {
  position: relative;
}

.hanging-cloth {
  --hanging-cloth-size: clamp(68px, 7vw, 88px);
  position: absolute;
  z-index: 5;
  top: 100%;
  right: 12px;
  width: var(--hanging-cloth-size);
  height: auto;
  pointer-events: none;
  transform-origin: 50% 1%;
  animation: hanging-cloth-breeze 5.5s ease-in-out infinite;
}

.hanging-cloth--shirt {
  right: calc(var(--hanging-cloth-size) + 24px);
  animation-delay: -2.75s;
}

.hanging-cloth--firefly {
  --hanging-cloth-size: clamp(56px, 6vw, 76px);
  right: calc(clamp(68px, 7vw, 88px) * 2 + 48px);
  animation-delay: -1.4s;
}

.nav {
  padding-right: max(6vw, 312px);
}

.top {
  padding-right: max(5vw, 312px);
}

@keyframes hanging-cloth-breeze {
  0%, 100% { transform: rotate(-5deg) skewX(-0.7deg) scaleX(1); }
  27% { transform: rotate(3deg) skewX(0.9deg) scaleX(0.98); }
  53% { transform: rotate(8deg) skewX(1.4deg) scaleX(0.96); }
  78% { transform: rotate(-2deg) skewX(-0.3deg) scaleX(1); }
}

@media (max-width: 760px) {
  .nav {
    padding-right: 164px;
  }

  .navlinks {
    display: flex;
    flex: 0 0 calc(100% + 5vw + 164px);
    width: calc(100% + 5vw + 164px);
    box-sizing: border-box;
    justify-content: center;
    gap: clamp(6px, 2vw, 12px);
    margin: 12px -164px 0 -5vw;
    padding: 4px 5vw 6px;
    background: transparent;
    font-size: clamp(8px, 2.5vw, 10px);
    letter-spacing: 0.02em;
  }

  .navlinks a {
    display: inline-flex;
    position: relative;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 40px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
  }

  .navlinks a::after {
    position: absolute;
    right: 2px;
    bottom: 4px;
    left: 2px;
    height: 3px;
    border-radius: 2px;
    background: var(--color-accent);
    content: '';
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-base);
  }

  .navlinks a:hover::after,
  .navlinks a:focus-visible::after,
  .navlinks a[aria-current="page"]::after {
    transform: scaleX(1);
  }
}

@media (max-width: 600px) {
  .top {
    padding-right: 164px;
  }

  .hanging-cloth--dress {
    right: 10px;
    width: 46px;
  }

  .hanging-cloth--shirt {
    right: 58px;
    width: 44px;
  }

  .hanging-cloth--firefly {
    right: 110px;
    width: 42px;
  }

  .order-label {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hanging-cloth {
    animation: none;
  }
}
