@layer business {
.wallpaper-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.88;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* 确保 panel 内所有内容层级在壁纸层之上 */
#desktop-panel > *:not(.wallpaper-layer),
#chat-panel > *:not(.wallpaper-layer) {
  position: relative;
  z-index: 1;
}

/* 有壁纸时：chat-panel 自身背景透明，让壁纸层透出来 */
#chat-panel:has(.wallpaper-layer) {
  background-color: transparent !important;
}

/* 有壁纸时：header 和 input-area 半透明，让壁纸透出来 */
#chat-panel:has(.wallpaper-layer) .main-header {
  background: rgba(245, 241, 232, 0.55) !important;
  backdrop-filter: blur(8px);
}
#chat-panel:has(.wallpaper-layer) .input-area {
  background: rgba(245, 241, 232, 0.55) !important;
  backdrop-filter: blur(8px);
}
#chat-panel:has(.wallpaper-layer) #conversation-info-panel {
  background: rgba(239, 233, 220, 0.55) !important;
  backdrop-filter: blur(8px);
}

/* 有壁纸时：desktop-canvas 背景透明，并隐藏横线纹理 */
#desktop-panel:has(.wallpaper-layer) .desktop-canvas {
  background: transparent !important;
}
#desktop-panel:has(.wallpaper-layer) .desktop-canvas::before {
  display: none;
}

/* 外观设置面板 */
.appearance-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 100%;
}

.appearance-section-title {
  font-size: 0.72rem;
  color: var(--color-text-muted, var(--text-muted));
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.wallpaper-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
  background: var(--bg-card);
}

.wallpaper-item.active {
  border-color: var(--color-primary, var(--color-primary));
}

.wallpaper-item img,
.wallpaper-item .wallpaper-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wallpaper-item .wallpaper-thumb {
  background-size: cover;
  background-position: center;
}

/* 「默认」缩略图 */
.wallpaper-item.default-item .wallpaper-thumb {
  background: var(--bg-void, var(--bg-void));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--color-text-muted, var(--text-muted));
}

.wallpaper-item .wallpaper-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wallpaper-item:hover .wallpaper-delete {
  display: flex;
}

.wallpaper-upload-btn {
  border-style: dashed;
  cursor: pointer;
}

.appearance-status {
  font-size: 0.72rem;
  color: var(--color-text-muted, var(--text-muted));
  min-height: 1em;
  text-align: center;
}

}