#skeleton-loader {
  position: fixed;
  inset: 0;
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 24px);
  z-index: 9999;
  pointer-events: none;
  display: none;
}

.skel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
}

.skel-logo {
  width: 92px;
  height: 28px;
  border-radius: 999px;
  background: var(--skel-bg);
  position: relative;
  overflow: hidden;
}

.skel-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--skel-bg);
  position: relative;
  overflow: hidden;
}

.skel-avatar-color {
  background: var(--skel-fg);
}

.skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  align-content: start;
  margin-right: 16px;
}

.skel-bg-card {
  border-radius: 12px;
  background: var(--skel-bg);
  padding: 12px;
  display: grid;
  grid-template-rows: 140px auto;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.skel-avatar-selection {
  border-radius: 12px;
  background: var(--skel-bg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.skel-img {
  border-radius: 10px;
  background: var(--skel-fg);
  overflow: hidden;
  position: relative;
}

.skel-line {
  height: 12px;
  border-radius: 6px;
  background: var(--skel-fg);
  position: relative;
  overflow: hidden;
}

.skel-bg-card {
  display: grid;
}

.skel-line.short {
  width: 40%;
}

.skel-line.med {
  width: 70%;
}

.skel-line.long {
  width: 100%;
}

.skel-stack {
  display: grid;
  gap: 8px;
}

.skel-cols {
  display: flex;
  width: 100%;
  gap: 24px;
}

.skel-cols > :first-child {
  flex: 5;
}

.skel-cols > :nth-child(2) {
  flex: 2;
}

.skel-friends-col > :first-child {
  flex: 1;
}

.skel-friends-col > :nth-child(2) {
  flex: 9;
}

.skel-friends-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-left: 16px;
}

.skel-avatar-cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.skel-avatar-cards > * {
  flex: 0 0 auto;
}

.skel-avatar-cards .skel-img {
  width: 72px;
  height: 72px;
}

.skel-avatar-colors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
  gap: 16px;
}

.skel-friends-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skel-friend-card {
  align-items: flex-start;
  gap: 12px;
  border-radius: 12px;
  background: var(--skel-bg);
  padding: 12px;
  display: flex;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.skel-friend-name {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

:root {
  --skel-bg: #b0b0b0;
  --skel-fg: #d6d6d6;
  --skel-sheen: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.skel-img::after,
.skel-line::after,
.skel-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: var(--skel-sheen);
  animation: sheen 1.3s infinite;
}
@keyframes sheen {
  100% {
    transform: translateX(100%);
  }
}

#skeleton-loader.page-ready {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .skel-cols {
    flex-wrap: wrap;
  }

  .skel-cols > * {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  #skeleton-loader {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 16px;
    gap: 8px;
  }
  .skel-cols {
    align-items: center;
    justify-content: center;
  }
  .skel-grid {
    margin-right: 0;
  }
}
