.wm-desktop {
  min-width: 0;
  flex-shrink: 0;
  padding: 16px;
  border: 1px solid var(--line, #ded4c6);
  border-radius: 12px;
  container-type: inline-size;
}
.wm-desktop [hidden] { display: none !important; }
.wm-desktop h3, .wm-desktop p { margin: 0; }
.wm-desktop summary { cursor: pointer; }
#desktop-workspace > summary { font-size: 16px; font-weight: 600; }
#desktop-setup {
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line, #ded4c6);
  border-radius: 8px;
  font-size: 12px;
}
#desktop-setup[open] > :not(summary) { margin-top: 8px; }
.desktop-actions, .desktop-downloads, .desktop-main-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.desktop-downloads a { color: #70533b; text-underline-offset: 3px; }
#workspace-dialog #desktop-code { width: min(260px, 100%); margin: 0; }
#desktop-status, #desktop-empty { padding-block: 12px; font-size: 12px; color: #655a50; }
#workspace-dialog.embedded #workspace-form {
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-inline-end: 8px;
}
#workspace-dialog .desktop-layout {
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  flex: none;
}
.desktop-sidebar { max-height: 440px; }
.desktop-sidebar p { font-size: 12px; color: #655a50; }
#desktop-scenes button { overflow-wrap: anywhere; }
#workspace-dialog #desktop-scenes button.selected { background: #dce9df; border-color: #66876e; }
#desktop-scenes small { display: block; margin-top: 4px; }
.desktop-main-head { justify-content: space-between; }
.desktop-main-head h3 { overflow-wrap: anywhere; font-size: 14px; }
#desktop-selection-count {
  margin-inline-end: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.desktop-resource-list {
  max-height: clamp(168px, 38vh, 420px);
  overflow: auto;
  border: 1px solid #ddd3c5;
  border-radius: 8px;
}
.desktop-columns, #workspace-dialog .wm-desktop-row {
  display: grid;
  grid-template-columns: 20px 76px minmax(0, 1fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0;
  font-size: 12px;
}
.desktop-columns {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eee7dc;
  font-weight: 600;
}
#workspace-dialog .wm-desktop-row { border-bottom: 1px solid #e9e1d6; cursor: pointer; }
#workspace-dialog .wm-desktop-row:last-child { border-bottom: 0; }
#workspace-dialog .wm-desktop-row input[type=checkbox] {
  display: inline-block;
  inline-size: 14px;
  block-size: 14px;
  margin: 0;
  padding: 0;
  accent-color: #52775d;
}
.wm-desktop-row:has(input:checked) { background: #edf3ed; }
.wm-desktop-row:has(input:disabled) { cursor: default; }
.desktop-resource-name, .desktop-path { overflow-wrap: anywhere; }
.desktop-kind, .desktop-location { color: #655a50; }
.desktop-location small { display: block; font-size: 12px; }
.desktop-footer { justify-content: flex-end; }
#workspace-dialog #desktop-name { width: auto; min-width: 0; flex: 1 1 200px; margin: 0; }
#workspace-dialog #desktop-scan, #workspace-dialog #desktop-save, #workspace-dialog #desktop-restore {
  background: #806348;
  border-color: #806348;
  color: #fffaf1;
}
#workspace-dialog #desktop-delete { margin-inline-end: auto; color: #a34036; }
.wm-legacy-links { flex-shrink: 0; min-height: 0; }
.wm-legacy-links > summary { cursor: pointer; margin: 8px 0; }
.wm-legacy-links .wm-layout { min-height: 300px; }
.wm-legacy-links .wm-sidebar { max-height: 350px; }
@container (max-width: 580px) {
  #workspace-dialog .desktop-layout { grid-template-columns: minmax(0, 1fr); }
  #workspace-dialog .desktop-sidebar { border-right: 0; padding-right: 0; }
  #desktop-scenes { display: flex; gap: 8px; overflow: auto; }
  #desktop-scenes button { width: auto; flex: 0 0 auto; max-width: 75%; }
  .desktop-columns { display: none; }
  #workspace-dialog .wm-desktop-row { grid-template-columns: 20px 76px minmax(0, 1fr); }
  .desktop-location { grid-column: 2 / -1; }
}

#workspace-dialog .desktop-hardware-selected {
  outline: 2px solid #8b6b47;
  outline-offset: -2px;
}
#workspace-dialog #desktop-focus-scenes {
  width: auto;
  margin-block-end: 8px;
}
