#initial-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--sk-bg, #fff);
  transition: opacity 0.5s ease;
}

#initial-loader,
.app-skeleton {
  --sk-bg: hsl(var(--background-paper, 0 0% 100%));
  --sk: hsl(var(--grey-50, 0 0% 92%));
  --sk-shine: hsl(var(--grey-20, 0 0% 97%));
  --sk-line: hsl(var(--grey-100, 0 0% 90%));
  --sk-accent: hsl(var(--primary, 278 79% 59%));
}

@media (prefers-color-scheme: dark) {
  html:not(.light) #initial-loader,
  html:not(.light) .app-skeleton {
    --sk-bg: #222326;
    --sk: #313236;
    --sk-shine: #3c3d41;
    --sk-line: #3a3b3e;
    --sk-accent: #b794f6;
  }
}

html.light #initial-loader,
html.light .app-skeleton {
  --sk-bg: hsl(var(--background-paper, 0 0% 100%));
  --sk: hsl(var(--grey-50, 0 0% 92%));
  --sk-shine: hsl(var(--grey-20, 0 0% 97%));
  --sk-line: hsl(var(--grey-100, 0 0% 90%));
  --sk-accent: hsl(var(--primary, 278 79% 59%));
}

html.dark #initial-loader,
html.dark .app-skeleton {
  --sk-bg: hsl(var(--background-paper, 226 3% 14%));
  --sk: hsl(var(--grey-100, 226 3% 22%));
  --sk-shine: hsl(var(--grey-300, 226 3% 30%));
  --sk-line: hsl(var(--grey-200, 226 3% 24%));
  --sk-accent: hsl(var(--primary, 278 74% 64%));
}

.app-skeleton {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sk-bg);
  box-sizing: border-box;
  user-select: none;
}

.app-skeleton *,
.app-skeleton *::before,
.app-skeleton *::after {
  box-sizing: border-box;
}

.sk-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sk-bone {
  display: block;
  border-radius: 6px;
  background-color: var(--sk);
  background-image: linear-gradient(100deg, transparent 20%, var(--sk-shine) 50%, transparent 80%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}

@keyframes sk-shimmer {
  from {
    background-position: 140% 0;
  }
  to {
    background-position: -80% 0;
  }
}

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

.sk-header {
  display: flex;
  align-items: center;
  flex: none;
  height: 64px;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--sk-line);
  background: var(--sk-bg);
}

.sk-logo {
  width: 112px;
  height: 28px;
  flex: none;
}

.sk-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  height: auto;
  margin-left: auto;
}

.sk-tab {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.sk-tab.on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--sk-accent);
}

.sk-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.sk-icon,
.sk-avatar {
  border-radius: 999px;
  flex: none;
}

.sk-icon {
  width: 32px;
  height: 32px;
}

.sk-avatar {
  width: 34px;
  height: 34px;
}

.sk-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sk-line);
}

.sk-toolbar-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sk-title {
  width: 168px;
  height: 18px;
}

.sk-meta {
  width: 104px;
  height: 10px;
}

.sk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.sk-btn {
  width: 104px;
  height: 36px;
  border-radius: 10px;
}

.sk-btn-short {
  width: 72px;
}

.sk-body {
  padding: 16px;
  min-height: 0;
  overflow: hidden;
}

.sk-panel {
  border: 1px solid var(--sk-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--sk-bg);
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sk-line);
}

.sk-row:last-child {
  border-bottom: 0;
}

.sk-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sk-line {
  height: 12px;
  max-width: 100%;
}

.sk-line-sm {
  height: 8px;
}

.sk-trail {
  width: 64px;
  height: 28px;
  border-radius: 8px;
  flex: none;
}

@media (max-width: 720px) {
  .sk-header {
    height: 56px;
  }

  .sk-nav,
  .sk-btn-short,
  .sk-trail {
    display: none;
  }
}
